Hover and click functionality on same div
<p>What is the right way to attach both hover and onclik functionality on the same div?</p>

<p>Here's what I tried but it didn't work (clicking does nothing):</p>

<pre><code>$(function outlineHider(){
    $("#hotspot").hover(
        function() {
            $("#outlines").show(); //showing another div element
            function bindClick() {
                $("#hotspot").click(callAnotherFunction())};
            }, 
            function() {
                $("#outlines").hide();
            }
        );  
}); 
</code></pre>
