I am trying to wrap this function
$( "li.menu-item" ).hover(function() { // mouse enter
$( this ).find( " > .sub-menu" ).show(); // display immediate child
}, function(){ // mouse leave
if ( !$(this).hasClass("current_page_item") ) { // check if current page
$( this ).find( ".sub-menu" ).hide(); // hide if not current page
}
});
In:
(function($){
})(jQuery);
To eliminate the $ is not a function error in WordPress. Below is my code. I a still receiving the $is not a function error. Can someone please help me to update this code to resolve the error?