Modaal is an accessible dialog window library for all humans that makes it easy to create “pop-ups”, or modal windows with jQuery. In this post I’m going to show you how to use this in WordPress.
Here are the steps to getting started:
- Head over to GitHub and download or fork a copy of the source code.
- Copy over the CSS from the dist folder into your own style.css file, or include it using the
- Make sure your theme is using at least jQuery 1.11.2 or higher.
- Include the JS from the dist folder using the
wp_enqueue_script()Make sure you include this script after you include jQuery.
The next few steps depend on how you want to use the plugin. Below are a few examples. You’ll need to put similar code into the ‘text’ tab of the editor.