fnDrawCallback has no effect on Child rows
fnDrawCallback has no effect on Child rows
Alex67000
Posts: 39Questions: 6Answers: 0
Hi,
I'm using tooltip from bootstrap:
"fnDrawCallback": function( oSettings ) {
$('[rel="tooltip"]').tooltip();
},
It's working perfectly on usual datatables rows containing a tooltip, but it won't work if it is in a row child. Why?
This discussion has been closed.
Answers
HTML Example:
AJAX source:
{
"data": [
{
"name": "<span rel=\"tooltip\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"this is a tooltip\" class=\"souligne\">Tiger Nixon<\/span>",
"position": "System Architect",
"salary": "$320,800",
"start_date": "2011/04/25",
"office": "Edinburgh",
"extn": "5421"
},
{
"name": "<span rel=\"tooltip\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title=\"this is a tooltip\" class=\"souligne\">Test tooltip<\/span>",
"position": "Accountant",
"salary": "$162,700",
"start_date": "2008/11/28",
"office": "Tokyo",
"extn": "5407"
},
{
"name": "Brielle Williamson",
"position": "Integration Specialist",
"salary": "$372,000",
"start_date": "2012/12/02",
"office": "New York",
"extn": "4804"
},
{
"name": "Herrod Chandler",
"position": "Sales Assistant",
"salary": "$137,500",
"start_date": "2012/08/06",
"office": "San Francisco",
"extn": "9608"
},
{
"name": "Rhona Davidson",
"position": "Integration Specialist",
"salary": "$327,900",
"start_date": "2010/10/14",
"office": "Tokyo",
"extn": "6200"
},
{
"name": "Michael Bruce",
"position": "Javascript Developer",
"salary": "$183,000",
"start_date": "2011/06/27",
"office": "Singapore",
"extn": "5384"
},
{
"name": "Donna Snider",
"position": "Customer Support",
"salary": "$112,000",
"start_date": "2011/01/25",
"office": "New York",
"extn": "4226"
}
]
}
You can also see that if you remove:
usual rows containing a tooltip won't work.
Sources :
http://datatables.net/download/packages
http://your-url/examples/api/row_details.html
Just change the file row_details.html with my html code to see the test case (and add the file objects.txt to the same folder).
Any help appreciated!