Whats wrong with this?
var hover = $('<img />').attr('src', hovers[i]).css('position',
'absolute',
'visibility' ,
'hidden');
for some reason the 'visibility' , 'hidden' does not get called? but if i remove the position style it does.
What am i doing wrong here?
The answer is to pass an object with key value pairs into the css method rather then passing extra arguments:
See the documentation here for “.css(map)”: http://api.jquery.com/css/#css2