I have some DIVs. Inside these DIVs are some texts, images, tags... I need to show "alert", when text is clicked. Not images, not other tags, not text in other tags... just text inside DIVs. How to do it with jQuery ?
HTML
<div style="background-color:PapayaWhip;">Some text.
<img src="http://ynternet.sk/test2/close_1.jpg" />
<img src="http://ynternet.sk/test2/close_2.jpg" />
</div>
<div style="background-color:Moccasin;">This are letters
<em>and this are not.</em>
Hello again!
</div>
<div style="background-color:LightGoldenRodYellow;">
<img src="http://ynternet.sk/test2/close_1.jpg" />
<img src="http://ynternet.sk/test2/close_2.jpg" />
Letters in new line.
<img src="http://ynternet.sk/test2/close_1.jpg" />
<img src="http://ynternet.sk/test2/close_2.jpg" />
</div>
<div style="background-color:Wheat;">New letters in another line.</div>
CSS
div {
padding:10px 0px 0px 20px;
font-family:Verdana;
height:40px;
}
em{
color:red;
}