$(document).ready( function () { //check if hash is not empty if (window.location.hash) { var type = window.location.hash.substr( 1); //scroll to div with id '#result_' +type $ ("html,body" ).animate ({ scrollTop : $('#result_' + type).offset().top }, 300); } });
No comments:
Post a Comment