Reputation: 80
I have a problem with the following code:
$('#dynamictable').append('<table id="selectable"></table>');
var table = $('#dynamictable').children();
table.append("<tr><td>a</td><td>b</td></tr>");
table.append("<tr><td>c</td><td>d</td></tr>");
$("#selectable").selectable({
filter: "td",
selecting: function(event, ui) {
console.log($(ui.selecting).prevAll().length);
}
});
I need to select the row and the columns.
Can you help me?
Upvotes: 1
Views: 1410
Reputation: 112
is that required to append table with script? if its not then u can use this way,
`http://jsfiddle.net/54Dd9/1/`
you have to use jquery ui to use selectable function
http://jsfiddle.net/54Dd9/3/
Upvotes: 1
Reputation: 2413
$('#identifier').selectable({ });
is not part of the jquery core library,
You need to include the jQuery UI library which has this functionality http://jqueryui.com/
Updated your fiddle to a working example
Upvotes: 0