Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My site has a stop-scrolling parallax effect. The code I use to stop the scrolling is:

JavaScript
if ( parseInt($("div#bg").css("top"), 10) <= -0 ) {
    $('#content').css('top', (-0) + 'px');
    $('#logo').css('margin-top', (-142) + 'px');
}


This works fine in Chrome, Firefox and Opera but not so much in Safari. Is there a different code to use in Safari? I know Safari has a bug when it comes to scrolling, but I couldn't quite find an answer for it. Is there a workaround to make it also work in Safari? Or some kind of editor that I can run my code through?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900