coolispaul
asked on
Move background image based on mouse position from right side of screen
Hi
Im moving a background image based on x mouse position with :
Thanks
Im moving a background image based on x mouse position with :
$("html").mousemove(function(e){
var strength1 = 100;
var pageX = e.pageX - ($(window).width() / 2);
$('#foreground1').css("background-position", (strength2 / $(window).width() * pageX * -1));
}
this works fine with images on left. How can i adjust this for an image sat on the right of the screen?Thanks
Do you have a link we can look at?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.