Launch Bootstrap 4 Modal From WordPress Menu

[ad_1]

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.

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

[ad_2]

PROMEX · YOUR ACCOUNT

Login / Register

Use your WhatsApp number. We’ll send you a code to sign in securely.

Your code expires in 5 minutes. Never share it with anyone.