Javascript/Jquery??
-
Hi, I’ve been working on a side nav for my post categories. The theme that I have been modifying ‘comfy’ uses JQuery and I think this is effecting the javascript for my side menu from working. Please take a look at the menu I’ve made; https://www.fuximagazine.com/film/2010/05/17/japan-to-remake-90s-box-office-mega-hit-ghost/
The options on the left should work as an expanding/collapsing menu. Below is the script that I am using;
function initMenus() { $('#fuximenu ul').hide(); $.each($('#fuximenu'), function(){ $('#' + this.id + '.expandfirst ul:first').show(); }); $('#fuximenu li a').click( function() { var checkElement = $(this).next(); var parent = this.parentNode.parentNode.id; if($('#' + parent).hasClass('noaccordion')) { $(this).next().slideToggle('normal'); return false; } if((checkElement.is('ul')) && (checkElement.is(':visible'))) { if($('#' + parent).hasClass('collapsible')) { $('#' + parent + ' ul:visible').slideUp('normal'); } return false; } if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $('#' + parent + ' ul:visible').slideUp('normal'); checkElement.slideDown('normal'); return false; } } ); }
I think because it starts with ‘function’ is what is stopping it working. My other menu script, along with other scripts start with a $, in a file called jquery-custom.js
Does anybody have any idea how I can tell if this is case? or how you can edit javascript to become jquery?
Thanks in advance.
- The topic ‘Javascript/Jquery??’ is closed to new replies.