Thursday, 15 July 2010

Why my jquery script animate doesn't work? -



Why my jquery script animate doesn't work? -

here simple backround position animate. why ie 8 on mouse away don't animate ? opera , firefox don't show action , chrome well. how create work @ lates version browsers ?

$(function(){ $(".call_order").hover(function() { $(this).stop().animate({ backgroundpositionx: "-300" }, 100); } , function() { $(this).stop().animate({ backgroundpositionx: "0" }, 100); });

});

here sample

firefox , opera not back upwards backgroundpositionx , backgroundpositiony (bec. not in corresponding specifications.) , ie8 seems buggy background-position.

browser support backgroundpositionx , backgroundpositiony:

browser version ---------------------------- opera not supported firefox not supported safari 3+ ie 4+ chrome yes (version unknown)

so, suggest utilize brandon aaron's jquery plug-in have cross-browser back upwards background position.

if examine code; first tests backgroundpositionx property , see if supported browser. if not; parses out x , y values backgroundposition property.

note: unlike suggested in comments, css3 transforms would not helpful since need ie8 support.

jquery jquery-animate browser-support

No comments:

Post a Comment