hello. I have a question about choosing a css selector.
As partially shown below, an user clicks a dom element "dl dt", then the code executes whatever inside.
in the HTML, there is an element
<dl>
<dt>...</dt>
<dd>
<div id="">...</div>
</dd>
<dt>...</dt>
<dd>
<div id="">...</div>
</dd>
...
</dl>
then, by clicking "dl dt", the element works fine. But I want as well to change the attribute of the div element, which is a child of <dl> and is a sibling of <dt> .
How should I set the selector in order to make $(...).attr("id", "slideShow") work fine?
//-----------------------------jQuery code-------------------------------------------
$("dl dt").click(function(){
if($("+dd", this).css("display")=="none"){
$("dd").slideUp("slow");
$("+dd", this).slideDown("slow");
$("dt").removeClass("selected");
$(this).addClass("selected");
//★★★★★HERE!
$(this + "div").attr("id", "slideShow");
}