I have successfully implemented this code for vertical scrolling:
$('.flapleftclass').css('top',(0+(scrolled*0.5))+'px');
This method works well because I am referencing to the top position. However, when it comes to horizontal scrolling, '.flapleftclass' changes based on the screen size. What I am looking for is a way to calculate the center of the screen (50%). Is there a way to achieve this? For example, replacing 960 with 50% in the code snippet below:
$('.flapleftclass').css('left',(960+(scrolled*0.5))+'px');