if a div that contain a specific text, how can i cancel the parent div jquery

StackOverflow https://stackoverflow.com/questions/9785605

  •  25-05-2021
  •  | 
  •  

문제

i have this issue http://jsfiddle.net/valerioMassacci/LdCqX/

i have a specific div "comments" that onclick show me a set of elements but if the another div contain a specific text: "anonymous", the entire div must be cancelled (not only not displayed)

the problem is that the jquery script find anoymous string and set the display:none; but don't work when i click on comments

도움이 되었습니까?

해결책

use "contains"

$("div:contains('Anonimo')")

http://api.jquery.com/contains-selector/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top