Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

jquery search a div and change display

$
0
0
<div class='ParentTopic'><input id='ctl00_Topics_6' name='ctl00_Topics_6' type='checkbox' onclick="TopicAction(this);"><label for='ctl00_ctl54_tl00_Topics_6'>Countries</label></div>

I have a content page with lots of hml, but I want to do search for the div that contains the text of 'Countries', then find its parent div and set the style display to none.

The snipped of code I pasted is the rough outline of the html that is rendered.

The jquery snipped needs to check the html for the content of Countries in the label then traverse up to its nearest div and set the display to none (I want this hidden).

Looking for assistance if this can be done and how is done using jquery.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>