javascript - how to get selected items id in jquery selectables? -
This could be a simple question, but I could not find the solution. I stick to get the selected list item ID in this jquery selectables.my list such as
& lt; Ol id = "selectable" & gt; & Lt; Li id = "one" & gt; & Lt; Div & gt; A & lt; / Div & gt; & Lt; Div & gt; Two & lt; / Div & gt; & Lt; Div & gt; Three & lt; / Div & gt; & Lt; / Li & gt; & Lt; Li id = "two" & gt; & Lt; Div & gt; A & lt; / Div & gt; & Lt; Div & gt; Two & lt; / Div & gt; & Lt; Div & gt; Three & lt; / Div & gt; & Lt; / Li & gt; & Lt; / Ol & gt; My jquery code is such as
$ ("#selectable"). Selection ({filter: 'li'}); Now what I want is selected.It is getting the ID of the ID: If I select first on Li, then I need its ID. Thanks for any help.
You can:
$ ("#selected" ). Selection ({Selected: Function (Event, UI) {Warning (ui.selected.id)}}); Bella (choose item 1)
Comments
Post a Comment