Asc/Desc tooltip on sorting columns along with Headers name

Asc/Desc tooltip on sorting columns along with Headers name

NeenkNeenk Posts: 3Questions: 1Answers: 0

Thanks for the jquery package works very well. Recently the 508 team that we have wanted to see the Ascending/ descending along with the Header column name in the tooltip . I found the following in one of the post . But it does not work with header name . Tried using the same code under aoColumns for each clumn header. Any advice . Thanks in advance.

$("#resultstab").dataTable({ "bProcessing": true, "bPaginate": true, "bLengthChange": true, "bFilter": false, "bSort": true, "bInfo": true, "bAutoWidth": false, "sPaginationType": "full_numbers", "fnDrawCallback": function() { $('th').each(function(){ if (($(this).hasClass('sorting')) || ($(this).hasClass('sorting_desc'))) { $(this).attr({title: 'Sort Ascending'}); } else { $(this).attr({title: 'Sort Descending'}); } }); }});

Answers

  • larsonatorlarsonator Posts: 54Questions: 4Answers: 2
    edited August 2014

    Could you repost you'r code inside < pre >< / pre > tags so that it keeps its formatting?

  • NeenkNeenk Posts: 3Questions: 1Answers: 0
    $("#resultstab").dataTable({""bProcessing": true,
    "bPaginate": true,
    "bLengthChange": true, 
    "bFilter": false,"bSort": true,
    "bInfo": true,
    "bAutoWidth": false,
    "sPaginationType": "full_numbers",
    "fnDrawCallback": function() {
    
  • NeenkNeenk Posts: 3Questions: 1Answers: 0

    Full code

    $("#resultstab").dataTable({""bProcessing": true,
    "bPaginate": true,
    "bLengthChange": true, 
    "bFilter": false,"bSort": true,
    "bInfo": true,
    "bAutoWidth": false,
    "sPaginationType": "full_numbers",
    "fnDrawCallback": function() {
     $('th').each(function(){                
     if (($(this).hasClass('sorting')) || ($(this).hasClass('sorting_desc')))  
     {  
        $(this).attr({title: 'Sort Ascending'});} 
        else 
        {
        $(this).attr({title: 'Sort Descending'});
        }
     }); 
     }});
    
This discussion has been closed.