Links Selection Not Working in Using jQuery in Joomla Module -
good day everyone.
i'm building joomla module , trying collect links using following
menulinks = jquery('.menu .menu_items .menu_item a')
problem menulinks empty (i confirmed menulinks.length). worked fine when used outside joomla using html , javascript.
a quick appreciated, thanks!
finally found helped:
jquery('div').find('.megamenu .menu .menu_items .menu_item a').each(function() { count++; console.log(count); });
this should trick:
$(document).ready(function() { $('.menu .menu_items .menu_item').find('a').each(function() { var self = $(this); console.log(self.attr('href')); }); });
if check console, see shows links each menu item.
hope helps
Comments
Post a Comment