Launch Bootstrap 4 Modal From WordPress Menu


Add .launch-contact-modal class to your WordPress menu item. This can be done from the admin interface Appearance > Menu.

Change #contactModal in the following jQuery to the ID of your Bootstrap 4 modal.

  // Adding Bootstrap Modal to WordPress Menu
  $('.launch-contact-modal').find('a').attr('data-toggle', 'modal');
  $('.launch-contact-modal').find('a').attr('data-target', '#contactModal');


Leave a Reply

Random Post Selection ::

Recent Posts

Unlock Unlimited Downloads