Difference between revisions of "Template:UESTC-China/nav"

Line 188: Line 188:
  
 
<script>
 
<script>
$(window).resize(function(){
+
 
    console.log($(window).width());
+
if($(window).width()>1022)   
    if($(window).width()>1022)   
+
 
{
 
{
 
$(".dropdown").mouseover(function () {
 
$(".dropdown").mouseover(function () {
Line 200: Line 199:
 
       })
 
       })
 
     }
 
     }
else
+
 
 +
$(window).resize(function(){
 +
    console.log($(window).width());
 +
    if($(window).width()<=1022) 
 
{
 
{
      $(".dropdown").unbind();//防止屏幕由大变小造成事件仍在
+
$(".dropdown").unbind();//防止屏幕由大变小造成事件仍在
}
+
    }
 
})
 
})
 
</script>
 
</script>

Revision as of 01:29, 28 August 2019

description