1
嗨,我一直在试图让我的头围绕如何使用enquire.js。我使用.mouseenter(function()来激活函数.show和.hide。但是当你在平板电脑上查看它时,移动.mouseenter变得多余。我想告诉jquery在屏幕宽度达到我的屏幕时显示div 。媒体查询有效地使用Enquire.js和媒体查询为jquery动画
@media only screen and (min-width : 769px) and (max-width : 959px)
下面是一个例子
这里是我的jQuery:
$(".slidingDiv_how").hide();
$(".show_sub").show();
$('.show_sub').mouseenter(function(){
$(".slidingDiv_how").slideDown();
return false;
});
});
这里是我的html
<div class"right-wrapper"><!--How wrapper -->
<div id="how_we" class="show_sub1" style="cursor: hand; cursor: pointer;">
<h1><a href="#">How We Work:</a></h1>
<div class="slidingDiv_how">
<p class="show_sub1">The heat of the vertical rays of the sun was fast making our horrible prisons unbearable, so that after passing a low divide, and entering a sheltering forest, we finally.</br>
www.dochouse.co.uk</p>
</div> <!-- end slidingdiv2 -->
我已阅读文档,并不真正了解要放置哪个部分。任何帮助将非常感激。