how to create own function in JQuery?
<p>how to create own function and call it another function? like-</p>

<pre><code>$('.mycls li').hover(function() {    
var divid = $(this).find('li').attr('some_attr');
call myfunc(divid);
});

function myfunc(divid)
{
$(divid).show();
//I want to hide rest all divs 
$('div#info1').hide();
$('div#info2').hide();
$('div#info3').hide();
}
</code></pre>

<p><strong>I have 2 questions one is how to implement this logic in jquery second is which attribute can be used to reference the specific li to specific div</strong></p>

<p>my divs are as-</p>

<pre><code>&lt;div id="info1"&gt;
//some information
&lt;/div&gt;
&lt;div id="info2"&gt;
&lt;/div&gt;
....
</code></pre>
