Issue
For my web-page, things work fine on Android API level 21.
But when I test the same page against Android API level 18, some features do not work.
When I toggle class "check" on .div1 with javascript. The .div2 display is not updated.
Here is sample HTML and sample CSS
HTML
<div class="div1 check"></div>
<div class="div2"></div>
<div class="div1"></div>
<div class="div2"></div>
CSS .div2{ display: none;} .div1.check ~ .div2{ display: block;}
Again, this works fine in Android API level 21 but facing issues in Android API level 18.
Any suggestions?
Solution
Noticed as I change the device orientation the stock browser appears to have repainted the page and all the CSS worked.
So in order to force repaint the screen through code, I wrote a small util function which is
function _repaintPage() {
$("body").hide().show();
$("body").removeAttr("style");
}
Answered By - pratap
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.