开发者

Check for increased font size

Can I check with jQuery whether the User increased the font size and bind a functi开发者_StackOverflow社区on to this event, to recalculate some stuff when this happens?


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜