滑动面板 .stop() 在 $(this).next 上不起作用
Sliding Panel .stop() not working on $(this).next
我有多个框,将鼠标悬停在滑动面板上时,应该从悬停的面板上滑出。 我让它在面板上方时没有滑动面板停止的情况下工作,可以在这里看到:
https://jsfiddle.net/r70nbL8t/3/
$('.clickable_div').mouseover( function(){
$(this).next('.nav_menu').slideDown();
})
$('.clickable_div').mouseleave( function(){
$(this).next('.nav_menu').slideUp();
});
但是当我引入停止时,面板不再滑动
https://jsfiddle.net/r70nbL8t/4/
$(".wrap").mouseover(function(){
$(this).next(".nav_menu").stop().slideDown("slow");
});
$(".wrap").mouseout(function(){
$(this).next('.nav_menu').slideUp();
});
我一定是做错了什么简单的事。 您的帮助将不胜感激。
当你exec $(this).next()
返回元素p
时,你应该使用find()
函数
$(".wrap").mouseover(function(){
$(this).find(".nav_menu").stop().slideDown("slow");
});
$(".wrap").mouseout(function(){
$(this).find('.nav_menu').slideUp();
});
结果:https://jsfiddle.net/cmedina/r70nbL8t/5/
相关文章:
- $(this).prop('property') vs. this.property
- Twitter Bootstrap typeahead:使用“this”获取上下文/调用元素
- 在另一个函数中使用变量this
- this.router在AngularJS 2中未定义
- reactjs this.refs vs document.getElementById
- JavaScript 中的嵌套函数和 “this” 关键字
- React+Meteor:this.ops返回未定义
- javascript中对象构造函数中的var属性与this.properties
- 函数中this和var之间的区别
- ES6生成器:.next()的输入值
- jQuery(this).Pparent().Pparente().Prent().find()在iPad上不起作用
- Understanding Javascript scope with "var that = this&qu
- 定义this.properties或objectName.properties的javascript JSON对象
- Accessing $(this).next and slideDown
- 滑动面板 .stop() 在 $(this).next 上不起作用
- 路由调度从未呈现.您是否忘记在onBeforeAction中调用this.next()
- JQuery函数以及它们如何协同工作(after(),$(this).next().html())
- $(this).next()不能传递Resizable alsoResize
- 流星this.next()错误onBeforeAction
- this.next() error in Meteor Iron Router