I need to hide a div that has a certain string in it, using contains.. but jQuery is hiding all div's that are parents of the target div too !
$("div:contains('user_notifications')").css("display","none")
how do I tell jQuery to just match the div that actually contains that string?
Thanks
Edit:
here's the inner div that contains the string I want to match..
<div class="group" style="display: block;">
<input type="hidden" value="0" name="user[notification_options[new_reply]]" style="display: block;">
<input type="checkbox" value="1" name="user[notification_options[new_reply]]" id="user_notification_options[new_reply]" checked="checked" style="display: block;">
Request help from system admin
</div>