jquery - When i copy the HTML from DOM to template it works, otherwise not -


i have wordpress template , want add menu "wp_list_pages" , ready made script (http://www.webpulse.com.br/menuzord/index.html). when go website menu loses elements should added jquery

$(menu).children("li").children("a").each(function(){     if($(this).siblings(".dropdown, .megamenu").length > 0){     $(this).append("<span class='indicator'>" + settings.indicatorfirstlevel + "</span>");     } }); 

(this part of menu script). ignored. when copy source code template works. idea happens here? don't understand why same code works when hard coded , doesn't work when included dynamically?

this jquery call script:

$(document).ready(function(){     $("#menuzord").menuzord({         align: "left",         scrollable: true     }); }); 

since wordpress uses jquery.noconflict() removes $ alias window try using following instead of $(document).ready(){})

jquery(function($){    // code here }); 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -