tom
tom

Reputation: 14513

jquery failed updating image attribute on firefox

I have the following code

var first = $jq("<div></div>");
first.append("<td><img id='smile' src='/Images/smile.png' style='width: 120px; height: 120px; display: none; padding-top: 5px; padding-right: 5px;' alt='image' /></td>");

// some logic ...

var img = $jq('#smile');
img[0].style.display = 'inline';

The code works perfectly fine on IE (9), but not on FF (tried on 7.0). Any reasons? And if possible, work around?

Upvotes: 0

Views: 87

Answers (1)

xthexder
xthexder

Reputation: 1565

Try:

img.css("display", "inline");

http://api.jquery.com/css/

Upvotes: 1

Related Questions