This code functions properly on desktop browsers, but encounters issues when used on iPhones. Furthermore, the script mentioned below seems to be causing problems specifically on iPhone devices.
var $event = ($ua.match(/(iPod|iPhone|iPad)/i)) ? "touchstart" : "click";
The functionality is not working as expected on iPhones.
HTML
<button class="btn btn_mod" onclick="mod()">
<div class="mod_section">
<p>hello</p>
</div>
CSS
.mod_section.active{
display:none;
}
.mod_section{
display:block;
}
JQuery
function mod(){
$('.mod_section').addClass('active');
}