Tooltips on hyperlinked fields in table
Tooltips on hyperlinked fields in table
I've created a DataTable which includes a column of 4-character identifiers for certain meteorological data collection stations. I have a database which includes a record for each individual station. For example, in my database station KPHL has name: "Philadelphia", state: "PA", country: "US", latitude: 39.87, longitude: -75.23, elevation: 18.
I would like for the user to be able to hover over a specific hyperlinked station ID in the table, which would then display the relevant information from the database in the tooltip window. So if a user hovers over the blue "KPHL" in my table, they see the following information in a tooltip window:
Station Name: PHILADELPHIA
State: PA
Country: US
Latitude: 39.87
Longitude: -75.23
Elevation: 18
I'd like to implement AJAX for this. Is there built-in functionality for tooltips in DataTables? Or will I have to use a separate jQuery event?
Answers
I found an other library that I have incorporated into my datatables that takes care of displaying extra info via ajax.
See if http://qtip2.com/ might help you out
@bindrid: Great idea! Could you post some sample code to see how you use it with datatables for us lazy guys? Many thanks in advance!
Got it started now. This is an example for tooltips in a simple editor instance:
CDN's for qtip:
manipulate the default configuration:
Use it with Editor to explain field contents:
@bindrid: According to http://qtip2.com/plugins#ajax the use of Ajax is discouraged because it is deprecated. I also added a solution to translate the tooltips in case of foreign language requirements.
I built this in my dev environment for straight datatables with a .net back end.
@bindrid, many thanks for getting back with this!
Roland
hi Bindrid,
Am getting the below exception on $(me).qtip({
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'qtip'
Any help /Suggestion is appreciated
MY Source code
Thanks
Vj
Looks like you are loading the qtip JS, so really you'd need to give a link tp a page showing the issue.
Allan
Thanks Allan for your response. I have implemented the tooltip using Bootstrap tooltip and knock out now.