Conflicting JS when sorting

Conflicting JS when sorting

CsandersCsanders Posts: 1Questions: 0Answers: 0
edited September 2009 in General
Hi, I'm using DataTables for the first time, and I have to say it really adds some great functionality even for someone with little to no web design experience. I've got one problem that I can't figure out, and I think it's a conflict with scripts but I'm not sure what to do about it.

I'm using a script for a game which loads tooltips when you hover over a link.
()
Instructions: http://www.aionarmory.com/syndication.aspx

I have a link in the first column of my Datatable and it works fine at fist. However, after any sorting or search filtering I no longer get the tooltips. Sorting back to my initial order brings them back. Does data tables change the links or add extra class/id identifiers that might be causing this? I'd love to get my tooltips back when sorting but I'm not really sure where to start.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Hi Csanders,

    This is almost certainly due to the fact that you are adding the event handlers for the tooltips after initialising DataTables. Please see the following two demos for how to initialise event handlers on all rows:

    http://datatables.net/examples/advanced_init/events_pre_init.html
    http://datatables.net/examples/advanced_init/events_post_init.html

    Also my Visual Event bookmarklet (lets you see which nodes have events attached to them) might be of interest:

    http://www.sprymedia.co.uk/article/Visual+Event

    Regards,
    Allan
This discussion has been closed.