I am creating a website that upon loading, performs a series of j-query animation events. When the screen resolution of a browser changes (from wide screen to normal or from normal to tablet, etc) is it possible to change the parameters of the jquery animation that occurs upon loading? For example, when the screen resolution decreases, making the jquery animation move a 1000px to the left, instead of 1320px to the left?
My Jquery code for animation upon loading is as follows:
$(document).ready(function(){
$(window).load(function(){
$("#div1").delay(500).fadeIn(1000);
$("#div1").animate({bottom:"+=490px"});
$("#div1").animate({left:"+=1320px"});
$("#div1").fadeOut(1500);
I have used media queries to change to CSS styling when the screen resolution changes, now I just need to be able to change the j-query animation too.