Jquery/YUI - Find image and set CSS to display:none
- by danit
I have the following image in a CMS that I want to hide, I dont really want to change source code but would like to hide a specific image which does not have a class applied.
Here is the HTML:
<td class="right side">
<a title="Show only topic 1" href="view.php?id=3&topic=1">
<img alt="Show only topic 1" src="http://vl3.co.uk/iphone/pix/i/one.gif"/>
</a>
<br/>
</td>
I want to hide the <a> and the <img>, bare in mind the title and alt tag can be different so cant use that as an identifier.
I presume I could use .find() and then use .parent() to set the <a> to display: none; thus hiding the img?
Im inlcuding the jQuery library, however the CMS has YUI included out of the box so if anyone has a YUI method it would be appreicated.