我一直在网上搜索,并想了一会儿,但无法得到,我们可以使用!has()?我尝试了一些例子,但没有弄清楚我的想法。这里的任何人都可以解释我为什么可以使用它或为什么不使用它给我一些例子!jQuery - is!has()有效吗?
0
A
回答
2
您正在寻找:not(:has())
$('div:not(:has(span))') //div which don't have span in it
+0
? –
0
是的,这样的 -
if(!$('#one').has('#two'))
0
$(collection).filter(function(index) {
return !$(this).has('whatever');
});
的替代解决方案。
相关问题
- 1. Is-A vs Has-A的关系
- 2. IS -A关系与HAS-A关系有什么区别? Java
- 3. UML图当Class具有Is-a和Has-a关系时
- 4. Jquery has()vs parents()
- 5. jquery not()has()
- 6. Is unordered_set <reference_wrapper <Ty>>有效吗?
- 7. IS 2C10是一个有效的UTF-8字符吗?
- 8. CSS是否有类似jQuery的:has()?
- 9. 有一个有效的jQuery Hittest吗?
- 10. Jquery .style is undefined
- 11. jQuery slidetoggle is glitchy
- 12. jquery is select selected
- 13. Is!document.cookie可靠吗?
- 14. java中的IS-A关系和HAS-A关系
- 15. 如何决定是否使用IS A或HAS A关系
- 16. Django“dictionary update sequence element#0 has length 1; 2 is required”
- 17. SQL是-a/has-a/is-结构和验证
- 18. C#类图查看器?含。关系像has-a和is-a
- 19. 面向对象编程:IS-A与HAS-A的关系?
- 20. jQuery if element has class do something
- 21. jquery has/find/contains not working
- 22. jQuery addClass if not()has()元素
- 23. ANSI等效的IS NULL
- 24. LEFT JOIN和IS NULL效果
- 25. symfony 3 ChoiceType is not无效
- 26. jQuery if object is present
- 27. jQuery show is not working
- 28. 这是DrawableGameComponent中is和as操作符的高效使用吗?
- 29. Yii2 has has many custom condition
- 30. Laravel multiple where where has has callback
看到这个问题。 http://stackoverflow.com/questions/4045431/jquery-filtering-has-not – jerry
显示您的代码。你想使用':has'伪选择器还是'.has()'方法?请问例如 – Barmar