Using more than one element with the same ID is not going to work.  However,
you can use multiple classes to achieve your goal.

For instance: <td class="allart az">  Both CSS classes will apply and you
can use selectors in jQuery to find what you want.  Getting an ID will
return only one element.

Glen

On Jan 16, 2008 4:43 PM, Lionel Martelly <[EMAIL PROTECTED]> wrote:

>  I have some main td groups which have different group ids (id="allart",
> id="left", id="right") and each has it's class.
> They all contain unique divs which I am dragging and dropping in the
> different td
>
> <td id="allart" class="az" valign="top">
> <div style="-moz-user-select: none;" id="352" class="art"></td>
> <td id="allart" class="az" valign="top">
> <div style="-moz-user-select: none;" id="353" class="art"></td>
>
> etc ...
>
>
>
> I am using right-click context menu to specify the div id inside the td
>
>  $('#".$id.".art').contextMenu('mytest', {
>
> which successfully target the proper div id with class art.
>
>
>
> I'd like to further narrow it down to the main td id "allart" because when
>
> I drag and drop it in td id="left" for example, the id attribute remains the 
> same
>
>
>
> If it goes in a different td, I want to keep the div id but since it is in a 
> different catego, i'd like to give it another attribute.
>
>
>
> something like (notice the 2 #)
>
> $('#allart#".$id.".art').contextMenu('mytest', {
>
>
>
>
>
>
>
>

Reply via email to