将此与其他类选择器结合使用(Combining this with other classes selector)
只是一个快速的。 我有以下功能:
$('.menu').on('change', function() { $('.menu, .rows').toggle(); });我想用this取代第二个.menu 。 我怎样才能把它组合起来:
$(this, '.rows').toggle();不起作用。
谢谢
just a quick one. I have following function:
$('.menu').on('change', function() { $('.menu, .rows').toggle(); });and I want to replace the second .menu with this. How can I combine it like:
$(this, '.rows').toggle();does not work.
Thanks
最满意答案
你很亲密,试试:
$('.rows', this).toggle();You are close, try with:
$('.rows', this).toggle();更多推荐
发布评论