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
Post a Comment