[jQuery] Re: Superfish loading problem
I found this problem when I using smarty with jquery .. but I have not sloved this problem,whatever I using 1st method or 2nd method.. so I give up jQuery althrough jquery very cool...
[jQuery] Re: Superfish loading problem
Are you using any other Javascript library in the same page? smarty works server-side, there is no reason to conflict with jQuery unless you're doing something wrong. A working html example would help! On Sep 22, 2:11 pm, macleo [EMAIL PROTECTED] wrote: I found this problem when I using smarty with jquery .. but I have not sloved this problem,whatever I using 1st method or 2nd method.. so I give up jQuery althrough jquery very cool...
[jQuery] Re: Superfish loading problem
I figured out the problem. Well, most of it. 1st I needed to use jQuery.noConflict to get around the $ issue. The code is var $jQ = jQuery.noConflict(); var $jQ = jQuery; $jQ(document).ready(function(){ $jQ(ul.sf-menu).superfish({ pathClass: 'current' }); }); 2nd I have a conflict with Scriptaculous effect.js file. I need removed the file and it works. however the code that uses effect.js is broken. Is there a way around the jquery.min.js and effect.js conflict. On Aug 27, 11:47 am, glowens [EMAIL PROTECTED] wrote: I am running Superfish with Smarty templating engine but there appears to be a conflict with jquery and smarty I call Superfish using the basic code below but it will not work $(document).ready(function(){ $(ul.sf-menu).superfish({ pathClass: 'current' }); }); I changed the code to the following and it appears to call the code. jQuery(document).ready(function(){ $(ul.sf-menu).superfish({ pathClass: 'current' }); }); I beleive the issue is with the $. I tested this with the following. jQuery(document).ready(function(){ alert('test') }); }); and the alert is displayed. If I change the JQuery back to a $ it will not work. Any ideas or other ways to initiate the Superfish code.