To find the child Div Element using Jquery

by barkkathulla 2014-07-14 15:09:45

To find the child Div Element using Jquery
<div class="view">My Record Views
	<div class="related_images">
		<div id="rel_image_cont">
			Listed contents Here...
		</div>
	</div>
</div>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>	
<script type="text/javascript">
$(function(){
//This will show child element after clicking on class name(view)
$(".view").click(function() {
var id = $('.view').find('div.related_images').find('div').eq(0).attr('id');
alert(id);
});
});
</script>
OUTPUT:

706
like
0
dislike
0
mail
flag

You must LOGIN to add comments