I have this function which features this bit of code (edited for succinctness):
(function ($) {
// mouseenter event for each menu item
$menuItems.bind('mouseenter', function (e) {});
})(jQuery);
What I would like to do is access $menuItems from this function in other functions.
For example:
$("#products a").click(function(){
$menuItems.unbind("mouseenter");
});
I believe this is a matter of scope?
I’m unsure how to do this?
A third option: