I have the following code:
Javascript:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(function() {
var transition = 'slow';
var target = $('#somediv');
target.delay(5000).fadeIn();
});
</script>
HTML:
<div id="somediv">Some Content</div>
<div id="second_div">Some second content</div>
<div id="third_div">Some third content</div>
So as you can see the above function will work with #somediv but how do I reuse the same function for #second_div and #third_div?
I am new to Javascript so please pardon me if this is a stupid question. Thanks!