[jQuery] attr difference in Firefox and IE7

[jQuery] attr difference in Firefox and IE7


Hi,
I'm using the .attr() to set attributes of an img tag.
This works in Firefox 2.0.0.14 but not in Internet Explorer 7.
The offending piece of code is
$('#preview').livequery(function() {
    $('#preview').attr('src',previewImage);
    $('#preview').attr('width','302px');
    $('#preview').attr('height','188px');
    return false;
});
Works in FF but in IE, only the src is changed. The width and height
remain unaffected.
To see, check http://sid-deswal.110mb.com and click on 'Themes'
And I can't understand the IE error message which says
Line: 5
Char: 1
Error: Object Expected
Code: 0
Regards