Title: Javascript/Jquery??
Last modified: August 19, 2016

---

# Javascript/Jquery??

 *  Resolved [fuxiadmin](https://wordpress.org/support/users/fuxiadmin/)
 * (@fuxiadmin)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/javascriptjquery/)
 * 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; [http://www.fuximagazine.com/film/2010/05/17/japan-to-remake-90s-box-office-mega-hit-ghost/](http://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.

Viewing 1 replies (of 1 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/javascriptjquery/#post-1516048)
 * [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)

Viewing 1 replies (of 1 total)

The topic ‘Javascript/Jquery??’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * 1 reply
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/javascriptjquery/#post-1516048)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
