Mike
Mike

Reputation: 1863

min-width and max-width with jQuery

How to emulate for ie6?

Upvotes: 2

Views: 9766

Answers (2)

RwwL
RwwL

Reputation: 3308

Just adding to codeburger's anwser that you might as well put this in an external JS file or JS block that's shown only to IE6 via conditional comments.

Upvotes: 1

code_burgar
code_burgar

Reputation: 12323

to emulate max-width:

var maxWidth = 300;    
if ( $('SELECTOR').width() > maxWidth ) $('SELECTOR').width(maxWidth);

the same can be applied for width, height, min and max with minor adjustments.

Upvotes: 6

Related Questions