如何更改Javascript上的单击选项以在移动设备上工作?

问题描述

我发现此代码非常适合我需要的按钮,该按钮在单击时充当“手风琴” /打开按钮。但是,该代码不适用于移动版本。 你能帮忙吗?

<script>
document.addEventListener('DOMContentLoaded',function() {
jQuery(function($){
$('.showme').click(function(){
$(this).closest('.elementor-section').next().slidetoggle();
$(this).toggleClass('opened');
});
$('.closebutton').click(function(){
$(this).closest('.elementor-section').prev().find('.showme').click();
});
});
});
</script>
<style>
.showme a,.showme i,.showme img,.closebutton a,.closebutton i,.closebutton img{
cursor: pointer;
-webkit-transition: transform 0.34s ease;
transition : transform 0.34s ease;
}
.opened i,.opened img{
transform: rotate(90deg);
}
</style>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)