I want to hide an image on page load, depending on its title
This does not seem to work.. when i put this in my code, i get an alert for all the images that have a title (which is correct):
$('article a.tooltip img').load(function(){
if(this.title != ""){
alert(this.title);
}
});
In my CSS file I disabled the display of all images at first:
.contact a.tooltip{
display: none;
}
now i want to show all the images with non empty title, which doesnt work:
$('article a.tooltip img').load(function(){
if(this.title != ""){
this.show();
alert(this.title);
}
});
article a.tooltip img is not hidden.
.contact a.tooltip is hidden.
Change
to