jQuery ... is not a function error when adding in a sliding menu script.
On trying to add the jQuery sliding menu fromhttp://www.geektantra.com/2010/02/jquery-sliding-menu/... to my menu nav in the header.php file, I am getting the following error flagged up in Firebug:
jQuery("#HorizontalSlidingMenu .SlidingMenu").slidingMenu is not a function
The C5 site is:
Using Concrete5 5.4
I have included the jQuery sliding menu .js file in the header, and jQuery is loaded according to jquerify.
Any ideas where I may be going wrong?
jQuery is already included in C5, so there's no need to add it to your theme, as it looks like you have, from this line:
You can just take that out. Also, move Loader::element('header_required') so that it is before your reference jquery.sliding-menu.js. It should be the first thing after the HTML <head> tag.
Taken the link to jQuery out and moved the Loader line to just after the <head> tag. Now the script doesnt return an error for the function, however the default theme image slide show now doesnt show.
do I have to closedown my jQuery script? And if so how is that done?
Thanks for the help with this :)
use a check to see if its in editmode
line back before the end of the head block fixes the issues with editing.
However breaks the jQuery again with the error:
jQuery is not defined
still getting the error in firebug:
jQuery("#HorizontalSlidingMenu .slidingMenu").slidingMenu is not a function
don't know where to go from here, any more ideas or have I done something fundamentaly wrong in my header?
I had some problem with adding html code including java inside, but when I put it in html block it always make editor bar dissapear and I can't edit that page anymore! even I can't restore it to older version of my page...
But it solved when I delete
anyway, thanks all...