}
}
$(window).on("scroll", scrolled);
+
+ var main_nav_top_level = $('.top-bar-section').children('ul').children('li.menu-item-has-children');
+
+ main_nav_top_level.each(function() {
+ $(this).on("click", function(event){
+ var parentId = $(this).attr("id");
+ var childId = $(event.target).parent().attr("id")
+ console.log(parentId, childId);
+ if( parentId === childId ){
+ event.preventDefault();
+ }
+ });
+
+ });
});
}
}
$(window).on("scroll", scrolled);
+
+ var main_nav_top_level = $('.top-bar-section').children('ul').children('li.menu-item-has-children');
+
+ main_nav_top_level.each(function() {
+ $(this).on("click", function(event){
+ var parentId = $(this).attr("id");
+ var childId = $(event.target).parent().attr("id")
+ console.log(parentId, childId);
+ if( parentId === childId ){
+ event.preventDefault();
+ }
+ });
+
+ });
});