select all placement
select all placement
The design for a table calls for a "select All | None" option at the top left where the DataTables sInfo normally goes (and then the page controls to the right of that). I tried to add the html to sInfo like so.
[code]
"oLanguage": {
"sInfo": 'Select All | None'
}
[/code]
But jQuery can't find the elements. My jQuery function never gets called.
[code]
$('a[name="selectAll"]').click(function(){
$('input', oTable.fnGetNodes()).attr('checked','checked');
return false;
});
[/code]
If I just put the select All html in the page somewhere, it works fine. Is jQuery unable to find those elements because they're added after the page is initially loaded? And is there a good way to do what I'm trying to do here, maybe a way to add some html to that top div above the table?
[code]
"oLanguage": {
"sInfo": 'Select All | None'
}
[/code]
But jQuery can't find the elements. My jQuery function never gets called.
[code]
$('a[name="selectAll"]').click(function(){
$('input', oTable.fnGetNodes()).attr('checked','checked');
return false;
});
[/code]
If I just put the select All html in the page somewhere, it works fine. Is jQuery unable to find those elements because they're added after the page is initially loaded? And is there a good way to do what I'm trying to do here, maybe a way to add some html to that top div above the table?
This discussion has been closed.
Replies
Allan