How do I get the context of an item from a class (css & Jquery)
<pre><code>I have a few images with css -&gt; $(".toolTip").

&lt;img  width="150" height="200" src="&lt;?php echo $avatarPath; ?&gt; " class="toolTip" alt="&lt;?php echo $control_panel_id ?&gt;"/&gt;
</code></pre>

<p>In my code, I want to refer to the image as a tag, and not to the class. I want to apply jquery methods, to the specific image that I hover over (taking into account that all those images have the same class name..)</p>

<p>Is there a way to do this ... $(".toolTip").  and then getSelector() method, so that I will get the specific element the mouse hovered over?!?</p>

<p>UPDATE:
but when I try to put mouseover, it doesnt work..it positions the div near the first picture...</p>

<pre><code> $('body').append('&lt;div style="position:absolute; z-index:9999; background-color:#FF0000; width:150px; height:400px;" id="tooltip_outer"&gt;&lt;div style="position:absolute; z-index:9999;" id="tooltip_inner"&gt;&lt;/div&gt;&lt;/div&gt;');
 var $toolTip_inner=$("#tooltip_inner"); 
 var $toolTip_outer=$("#tooltip_outer");
// var $toolTip;



 if(!$(".toolTip"))
 {

     return;
 }


 $(".toolTip").hover(function(){

      $toolTip=$(this);
     if( $(this).attr("alt") )
     {  

        $tooltipText=$(this).attr("alt"); 

        $(this).attr("alt",'');

     }
     else
     {

       $bug[0]="There is no title a$toolTip_outerribute&lt;br/&gt;";
     }

      var t_width=$(this).outerWidth();
     var t_height=$(this).outerHeight();

    //Move css
     $toolTip_outer.css({
     'top':t_height-60,
     'left':t_width-140

    });

        $toolTip_inner.html("&lt;p&gt;The control panel id is: "+$tooltipText+" &lt;/p&gt;");        
        $toolTip_outer.show();

    },  
  function(){
      //hide tooltip
    $toolTip_outer.hide();  
    //fix text
    $toolTip_inner.html(''); 

     if($toolTip_inner)
     {   // restore title text
        $(this).attr('alt',$tooltipText); 
     }

  })
</code></pre>

<p>The location takes into account the first image only..</p>
