I have the following jQuery code
$(document).ready(function () { $(\'.navtoTop\').click(function(){ $(\"html\").scrollTop( $(\"#topofthePage\").of
You have to use window instead of html:
window
html
$(window).scrollTop( $("#topofthePage").offset().top );
Note that window should not be enclosed in quotes as i'ts an object and not a tag.