combining $(this) plus other selectors
Hi friends I'm in my very first days with jQuery and already astonished with its incredible power.
This is a very simple question but I can't figure the answer out.
First, my xhtml (lots of nodes like this in <li> elements):
-
<div class="titlebar">
<div class="title">XYZ</div>
<a href="javascript:void(0)"><img src="images/close.gif" title="Remove" /></a>
<a href="javascript:void(0)"><img src="images/edit.gif" title="Edit" /></a>
</div>
Those <divs> with the class "titlebar" has a couple of icons wrapped in <a>s, the <a>s has display:hidden;
I'm trying to make them appear only when the user rollover the .titlebar div, and only the two icons inside the "rollovered" bar.
So I'm trying lots of variants in the sort of the following proved syntactic disaster:
-
$(".titlebar").hover(
function (){$(this).$("a").show();},
function (){$(this).$("a").hide();}
);
My goal is to find a reference for both <a> elements nested inside the overed .titlebar, I've reviewed the, otherwise very useful and very usable, official jQuery documentation without finding lights.
I hope some expert in this forum could help me with this one, I don't promise anything but coming back with more questions soon, as long as I become able to give a hand to the newbies in a near future.
Thanks in advance.