I don't know why, but when my page loads, i get scrolled in the middle, but i don't have any anchor aiming on this point...
Now i have to put a \[code\]<a href='http://stackoverflow.com/questions/15657426/MY-URL#top'></a>\[/code\] anchor in every page for not getting scrolled on the middle...(Firefox don't even get them :0, -webkit browsers do...)
I have many anchor aiming on id's, and a JQuery script for smooth scrolling, but no one for the middle scrolling of pages on load.
Here is my the Jquery scripts who are using scroll function:\[code\](function($){ $.fn.ScrollTo = function(speed){ if(!speed) var speed = 'slow'; return this.each(function(){ $(this).click(function(){ var goscroll = false; var the_hash = $(this).attr('href'); var regex = new RegExp('(.*)\#(.*)','gi'); var the_element = ''; if(the_hash.match('\#(.+)')) { the_hash = the_hash.replace(regex,'$2'); if($('#'+the_hash).length>0) { the_element = '#' + the_hash; goscroll = true; } else if($('a[name=' + the_hash + ']').length>0) { the_element = 'a[name=' + the_hash + ']'; goscroll = true; } if(goscroll) { var container = 'html'; if ($.browser.webkit) container = 'body'; $(container).animate({ scrollTop:$(the_element).offset().top }, speed); return false; } } }); }); }; })(jQuery) $('a[href^=\"#\"]').ScrollTo('slow'); $('#back-top').hide(); $(window).scroll(function () {K if ($(this).scrollTop() > 100) { $('#back-top').fadeIn(); } else { $('#back-top').fadeOut(); } });\[/code\]What would fire that scrolling on load?
Now i have to put a \[code\]<a href='http://stackoverflow.com/questions/15657426/MY-URL#top'></a>\[/code\] anchor in every page for not getting scrolled on the middle...(Firefox don't even get them :0, -webkit browsers do...)
I have many anchor aiming on id's, and a JQuery script for smooth scrolling, but no one for the middle scrolling of pages on load.
Here is my the Jquery scripts who are using scroll function:\[code\](function($){ $.fn.ScrollTo = function(speed){ if(!speed) var speed = 'slow'; return this.each(function(){ $(this).click(function(){ var goscroll = false; var the_hash = $(this).attr('href'); var regex = new RegExp('(.*)\#(.*)','gi'); var the_element = ''; if(the_hash.match('\#(.+)')) { the_hash = the_hash.replace(regex,'$2'); if($('#'+the_hash).length>0) { the_element = '#' + the_hash; goscroll = true; } else if($('a[name=' + the_hash + ']').length>0) { the_element = 'a[name=' + the_hash + ']'; goscroll = true; } if(goscroll) { var container = 'html'; if ($.browser.webkit) container = 'body'; $(container).animate({ scrollTop:$(the_element).offset().top }, speed); return false; } } }); }); }; })(jQuery) $('a[href^=\"#\"]').ScrollTo('slow'); $('#back-top').hide(); $(window).scroll(function () {K if ($(this).scrollTop() > 100) { $('#back-top').fadeIn(); } else { $('#back-top').fadeOut(); } });\[/code\]What would fire that scrolling on load?