Quantcast
Channel: jQuery Plugins - css
Viewing all articles
Browse latest Browse all 10

Force a browser redraw

$
0
0

Sometimes it happens in some browsers that the engine does not redraw the content elements after some CSS properties have changed. So the design looks pretty weird and you have to force a manual redraw.

To force a redraw on a specific element you have two options:

1. Most common fix which works almost everytime

$('#myelement').forceRedraw(); //same as el.className = el.className

2. If the first solutions does not work we can force a redraw by changing the padding for 1ms and changing it back again afterwards.

$('#myelement').forceRedraw(true);


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>