Javascript scroll does not work in Safari - Solution

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Javascript scroll does not work in Safari - Solution

grindpattern
When a user views a project, scrolls to the bottom of a project and clicks a new one, the browser should scroll back to the top and display the new project.  However, this wasn't working for me in Safari (or iPhone).

After some digging around, I've found a solution in the jquery.corefunctions.js file.

Around line 33, you'll find this code:

success: function(data){
                                $("#load-content").show();
                                $('html').animate({scrollTop:0}, 200);
                                jQuery.latestLoad = id;
                                jQuery.contentInsert(data);
                        }

Simply change the following code from this:

$('html').animate({scrollTop:0}, 200);

to this:

$('html,body').animate({scrollTop:0}, 200);

Hope that helps.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Javascript scroll does not work in Safari - Solution

shou
Hi grindpattern, unfortunately this doesnt work in safari 4.0.3  or iphone to me -(
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Javascript scroll does not work in Safari - Solution

psychonautik
In reply to this post by grindpattern
works in safari 4.05 & chrome. thanks!!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Javascript scroll does not work in Safari - Solution

Slavic Palenyy
In reply to this post by grindpattern
Hey, that was bothering me for a while too, but thanks for the solution. You rock!!!

My URL: www.aimzero.info
Loading...