Cluetip within Datatables

Cluetip within Datatables

ministrypixelministrypixel Posts: 12Questions: 0Answers: 0
edited November 2011 in General
I am trying to use Cluetip tooltips within a datatable here: http://compassbiblechurch.tryhifi.com/ministries/pastor-mike?show=all_sermons I have posted a post on the jquery forum. Here the creator of Cluetip has responded and requested I contact datatables. If you can, please help.

Here is the forum post: http://forum.jquery.com/topic/cluetip-question

Thanks in advance!

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    I think the point that Karl makes about the error from pastor-mike (line 146) for $.validator.addMethod is quite an important one - I'd certainly suggest fixing that or removing it while debugging anything else since it might be a red-herring, it might not.

    Regarding the events - you might find this little bit of software useful: http://www.sprymedia.co.uk/article/Visual+Event+2 - it shows all elements that have events attached to them. In this case, nothing in the table appears to have events attached to them.

    Karl's other point about fnDrawCallback is certainly one option, but much easier to just initialise the cue tip before the DataTable:

    [code]
    $('a.tooltip').cluetip({local:true, cursor: 'pointer'});
    $('#sermons_all').dataTable();
    [/code]

    This question is in the FAQs: http://datatables.net/faqs#events :-)

    Allan
  • jcrawfordjcrawford Posts: 172Questions: 0Answers: 0
    Allan,

    I just stumbled upon this thread and I have to say damn nice job with Visual Event 2. I will be making use of that as well :)
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Thanks :-)
  • ministrypixelministrypixel Posts: 12Questions: 0Answers: 0
    I looked at the events link you gave on the datatables.net website. I feel like I am so close to getting this to work. Below is the code I have. Do you see something I need to change? Thanks so much!

    [code]
    $(document).ready(function() {
    $('a.tooltip').cluetip({local:true, cursor: 'pointer'});
    oTable = $('#sermons_all').dataTable({
    "fnDrawCallback": function ( oSettings ) {

    if ( oSettings.aiDisplay.length == 0 )
    {
    return;
    }

    var nTrs = $('tbody tr', oSettings.nTable);
    var iColspan = nTrs[0].getElementsByTagName('td').length;
    var sLastGroup = "";
    for ( var i=0 ; i
This discussion has been closed.