假如我一个div;里面有三个节点 ;现在我要用jq来判断节点样式名为class的节点是否存在
怎么判断
How does jq determine that a node contains a certain sub-element? - PHP Chinese website Q&A - How does jq determine that a node contains a certain sub-element? - PHP Chinese website Q&A
Take a look around and learn.
判断的话应该是$('div').children().is('.className'),返回布尔;直接用的话$('div').children('.className')应该就行。
How does jq determine that a node contains a certain sub-element? - PHP Chinese website Q&A - How does jq determine that a node contains a certain sub-element? - PHP Chinese website Q&A
Take a look around and learn.
判断的话应该是$('div').children().is('.className'),返回布尔;直接用的话$('div').children('.className')应该就行。