How to combine these 2 small tablesorter scripts -
i have jquery tablesorter script, , trying add these 2 functions together. seems simple, though unfortunately have little knowledge javascript.
it work when have 1 or other in , not have below.
<script type="text/javascript"> $(document).ready(function(){ $(function() { $("table").tablesorter({ sortlist:[[0,0]] }); }); }); $(document).ready(function(){ $("table").tablesorter({ textextraction:function(s){ if($(s).find('img').length == 0) return $(s).text(); return $(s).find('img').attr('alt'); } }); }); </script>
try do:
<script type="text/javascript"> $(document).ready(function () { $("table").tablesorter({ sortlist: [ [0, 0] ], textextraction: function (s) { if ($(s).find('img').length == 0) return $(s).text(); return $(s).find('img').attr('alt'); } }); }); </script>
Comments
Post a Comment