Hi,
I want to know some code to go to a particular element of javascript using scroll.
Hi,
I want to know some code to go to a particular element of javascript using scroll.
Try this code:
I hope this helpsCode:function jumpto(id){ if((obj = document.getElementById(id)) && obj != null){ window.scrollTo(0, obj.offsetTop); } }
Try this code:
Code:$('a[href=#target]'). click(function(){ var target = $('a[name=target]'); if (target.length) { var top = target.offset().top; $('html,body').animate({scrollTop: top}, 1000); return false; } });
Bookmarks