There seems to be a problem with the slideToggle() function on Android Chrome. During the animation, the font-size of the target div/p is changed to a smaller size (~80% of the initial size).
- The font-size changing is not intended
- The font-size change is not animated, but occurs instantly after I touch the button. The slideToggle animation works fine afterwards.
- The dev-tool does not show any change in font-size
I tried to setup the javascript in various ways (also with onClick calling the function) but the problem doesn't seem to be with the code but with the browser? If so, is there a way to fix this? Or am I doing something wrong here?
- I reproduced the problem on two different Android devices in chrome (don't know about other OS/browsers).
- The problem does not occur on the mobile view on my Macbook's Chrome dev-tool, only on the actual mobile devices
<script>
$( '.button' ).click( function() {
$( '.target' ).slideToggle();
});
</script>
<button type="button" name="button" class="button">BUTTON</button>
<div class="target">
<p>HELLO</p>
</div>