Yes i know this has been asked before here but i cannot seem to get an answer from the suggested solutions. I am trying to create one of the items in my Main menu to scroll to certain section on my website. The code that i am using which i have inserted just before closing of the body tag is as shown
var $root = jQuery('html, body'); jQuery('#t3-banner').click(function() { var href = jQuery.attr(this, 'href'); $root.animate({ scrollTop: $(href).offset().top }, 2000, function () { window.location.hash = href; }); return false; });
The section that i am trying to scroll to is the #t3-banner. On the menu item (which i have created as an external menu)i have added the #t3-banner in the link section.But it doesn't seem to work. I am not very good in j query. Could anyone here help me please.The site is this And the menu is let us hunt for you