Follow these steps to take advantage of the hoverIntent plugin for your menu:
In the Superfish download, locate the
hoverIntent.js
file inside thejs
folder and copy the file to your ownscripts
folder.Next, we need to attach the hoverIntent plugin to our HTML page.
Tip
Don't forget to keep dependencies in mind when attaching multiple JavaScript files to a page. All jQuery plugins depend on jQuery to operate, so jQuery needs to be attached to your page before any plugins. In this case, the Superfish plugin depends upon the hoverIntent plugin, so we need to make sure hoverIntent is added to our page before the Superfish plugin.
Add the new
<script>
tag to the bottom of your page with the other scripts as follows:<script src="scripts/jquery.js"></script> <script src="scripts/hoverIntent.js"></script> <script src="scripts/superfish.js"></script> <script src="scripts/scripts.js"> </script> <...