> fully work. I am trying to call a simple alternate function from
> jQuery $(document).ready method. How to make it work?
>
> $(document).ready(function() {
> $("#tableID").tablesorter({
> ....
> });
> alternate('tableID');
>
> });
Assuming that your 'alternate' function is in scope, yes that should
work fine. For example:
<script type="text/javascript" src="jquery.js">
<script type="text/javascript" src="jquery.tablesorter.js">
<script type="text/javascript">
function alternate(id) {
// custom fn
}
$(document).ready(function() {
$('#tableID').tableSorter({ /* options here */ });
alternate('tableID');
});
</script>
No comments:
Post a Comment