views:

47

answers:

2

Can i check with jQuery whether the User increased the font size and bind a function to this event, to recalculate some stuff when this happens?

A: 

Nope, this is totally browser handling. You can not catch an event if the font size increases, there is no such event unfortunately.

Sarfraz
+3  A: 

Unfortunately, no, you can't do this directly.

The closest you can get I believe is attaching to the resize event of an element you know this would have an effect on. You can do this by grabbing the resize plugin, then attaching the event to an element font-size changing would resize, like this:

$("#myDiv").resize(function() {
 //recalc
});

The resize plugin just makes the .resize() handler available on pretty much any element.

Nick Craver
it works! thank you.
padde