jquery ui - ui.selected is returning undefined when used with a table -
alert(id) returning nothing when used in table. when use jquery selectable on "ol" tag returns id of "li", when change "ol selectable" "table selectable", starts showing empty in alert message. need different when using table jquery ui selectable versus "ol" . please suggest.
$("#selectable").selectable({ selected: function (event, ui) { var id = $(ui.selected).attr("id"); var color = $(ui.selected).css("border-color"); alert(id); } });
adding filter: "td" helped achieve wanted to. got answer jquery forum https://forum.jquery.com/topic/jquery-selectable-as-table-not-returning-id credit goes jakecigar