Also, be careful, according to the spec:

*ID* and *NAME* tokens must begin with a letter ([A-Za-z]) and may be
followed by any number of letters, digits ([0-9]), hyphens ("-"),
underscores ("_"), colons (":"), and periods (".").

You can probably get away with using just a number for an ID, but if you
start noticing strange behavior in otherwise standard-compliant browsers,
this could be the cause.

Brian.

On 3/19/07, Yansky <[EMAIL PROTECTED]> wrote:


If you want to find the parent element's id of <li class="weddy_menu"
id="5">aga</li>, you could do something like this:

$('#5').parent('ul').attr("id");


talkz wrote:
>
> hey i have this code, how can i get the "visible" / "hidden" from the
uls?
> when i change the sort, i know what id i have on the div, but i want to
> know what is the <ul> my moved li is on..
>
> jquery:
>
>
> $('#visible,#hidden').Sortable({
>       accept : 'weddy_menu',
>       opacity:        0.2,
>       onChange: function (sorted) {
>               var bb="#" + $(".weddy_menu").attr("id");
>
>       }
> });
>
>
>
> html:
>
> <div >
>       <ul id="visible">
>               <li class="weddy_menu" id="1">dook</li>
>               <li class="weddy_menu" id="4">rook</li>
>       </ul>
> </div>
> <hr>
>
>
> <div>
>       <ul class="menu_admin" id="hidden">
>               <li class="weddy_menu" id="5">aga</li>
>               <li class="weddy_menu" id="6">baba</li>
>               <li class="weddy_menu" id="7">saba</li>
>       </ul>
> </div>
>
>

--
View this message in context:
http://www.nabble.com/how-do-i-get-%3CLI%3E%27s-UL-tag-id--tf3427869.html#a9556931
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to