DataTables + external infoTooltip
DataTables + external infoTooltip
Hi, first sorry for my english, isn't my native language...
I have problems with DataTables and external infotooltip javascript, Infotooltips only shows outside tables but not inside :S
My web is http://comunidadgenesis.es/index.php/dkpstera
and as you can see in "Mi personaje" tab, infotooltip works, but in "Movimientos de banco" doesn't work.
The infotooltip script changes
[code]Unknown[/code]
into
[code]
Undertaker Gloves
[/code]
and shows a tooltip.
I think that the problem is
- the loading-script-order
- or dataTables have a cellrenderer that don't let the infotooltip works
anyway i don't know how can solve this problem.
Anyone can help me?
Here is my code on the head tag:
[code]
Comunidad Genesis en Tera
<!---->
$(function() {
$( "#tabs" ).tabs();
});
function loadjscssfile(filename, filetype){
if (filetype=="js"){ //if filename is a external JavaScript file
var fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript")
fileref.setAttribute("src", filename)
}else if (filetype=="css"){ //if filename is an external CSS file
var fileref=document.createElement('link')
fileref.setAttribute('rel', 'stylesheet')
fileref.setAttribute('type', 'text/css')
fileref.setAttribute('href', filename)
}
if (typeof fileref!="undefined")
document.getElementsByTagName("head")[0].appendChild(fileref)
}
$(document).ready(function() {
loadjscssfile("http://teracodex.com/tools/codextooltips.js", "js");
});
jQuery.fn.dataTableExt.aTypes.push(
function ( sData ) {
return 'html';
}
);
$(document).ready(function() {
$('#Items').dataTable( {
"aoColumns": [
null,
null,
{ "sType": "html" },
null,
null,
null,
null
],
"aaSorting": [[ 3, "desc" ]],
"oLanguage": {
"sLengthMenu": 'Mostrando '+
'10'+
'20'+
'30'+
'40'+
'50'+
'Todos'+
' filas por pagina',
"sZeroRecords": "No se encontro nada - Lo siento",
"sInfoEmpty": "Mostrando 0 de 0 de un total de 0 filas",
"sInfoFiltered": "(Resultado de un total de _MAX_ filas)",
"sSearch": "Buscar:",
"sInfo": "Mostrando del _START_ al _END_ de un total de _TOTAL_ filas",
"oPaginate": {
"sNext": "Siguiente",
"sPrevious": "Anterior"
}
},
"sPaginationType": "scrolling"
});
$('#EventosBanco').dataTable( {
"aaSorting": [[ 2, "desc" ]],
"oLanguage": {
"sLengthMenu": 'Mostrando '+
'10'+
'20'+
'30'+
'40'+
'50'+
'Todos'+
' filas por pagina',
"sZeroRecords": "No se encontro nada - Lo siento",
"sInfoEmpty": "Mostrando 0 de 0 de un total de 0 filas",
"sInfoFiltered": "(Resultado de un total de _MAX_ filas)",
"sSearch": "Buscar:",
"sInfo": "Mostrando del _START_ al _END_ de un total de _TOTAL_ filas",
"oPaginate": {
"sNext": "Siguiente",
"sPrevious": "Anterior"
}
},
"sPaginationType": "scrolling"
});
$('#EventosFecha').dataTable( {
"aaSorting": [[ 2, "desc" ]],
"oLanguage": {
"sLengthMenu": 'Mostrando '+
'10'+
'20'+
'30'+
'40'+
'50'+
'Todos'+
' filas por pagina',
"sZeroRecords": "No se encontro nada - Lo siento",
"sInfoEmpty": "Mostrando 0 de 0 de un total de 0 filas",
"sInfoFiltered": "(Resultado de un total de _MAX_ filas)",
"sSearch": "Buscar:",
"sInfo": "Mostrando del _START_ al _END_ de un total de _TOTAL_ filas",
"oPaginate": {
"sNext": "Siguiente",
"sPrevious": "Anterior"
}
},
"sPaginationType": "scrolling"
} );
} );
[/code]
I have problems with DataTables and external infotooltip javascript, Infotooltips only shows outside tables but not inside :S
My web is http://comunidadgenesis.es/index.php/dkpstera
and as you can see in "Mi personaje" tab, infotooltip works, but in "Movimientos de banco" doesn't work.
The infotooltip script changes
[code]Unknown[/code]
into
[code]
Undertaker Gloves
[/code]
and shows a tooltip.
I think that the problem is
- the loading-script-order
- or dataTables have a cellrenderer that don't let the infotooltip works
anyway i don't know how can solve this problem.
Anyone can help me?
Here is my code on the head tag:
[code]
Comunidad Genesis en Tera
<!---->
$(function() {
$( "#tabs" ).tabs();
});
function loadjscssfile(filename, filetype){
if (filetype=="js"){ //if filename is a external JavaScript file
var fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript")
fileref.setAttribute("src", filename)
}else if (filetype=="css"){ //if filename is an external CSS file
var fileref=document.createElement('link')
fileref.setAttribute('rel', 'stylesheet')
fileref.setAttribute('type', 'text/css')
fileref.setAttribute('href', filename)
}
if (typeof fileref!="undefined")
document.getElementsByTagName("head")[0].appendChild(fileref)
}
$(document).ready(function() {
loadjscssfile("http://teracodex.com/tools/codextooltips.js", "js");
});
jQuery.fn.dataTableExt.aTypes.push(
function ( sData ) {
return 'html';
}
);
$(document).ready(function() {
$('#Items').dataTable( {
"aoColumns": [
null,
null,
{ "sType": "html" },
null,
null,
null,
null
],
"aaSorting": [[ 3, "desc" ]],
"oLanguage": {
"sLengthMenu": 'Mostrando '+
'10'+
'20'+
'30'+
'40'+
'50'+
'Todos'+
' filas por pagina',
"sZeroRecords": "No se encontro nada - Lo siento",
"sInfoEmpty": "Mostrando 0 de 0 de un total de 0 filas",
"sInfoFiltered": "(Resultado de un total de _MAX_ filas)",
"sSearch": "Buscar:",
"sInfo": "Mostrando del _START_ al _END_ de un total de _TOTAL_ filas",
"oPaginate": {
"sNext": "Siguiente",
"sPrevious": "Anterior"
}
},
"sPaginationType": "scrolling"
});
$('#EventosBanco').dataTable( {
"aaSorting": [[ 2, "desc" ]],
"oLanguage": {
"sLengthMenu": 'Mostrando '+
'10'+
'20'+
'30'+
'40'+
'50'+
'Todos'+
' filas por pagina',
"sZeroRecords": "No se encontro nada - Lo siento",
"sInfoEmpty": "Mostrando 0 de 0 de un total de 0 filas",
"sInfoFiltered": "(Resultado de un total de _MAX_ filas)",
"sSearch": "Buscar:",
"sInfo": "Mostrando del _START_ al _END_ de un total de _TOTAL_ filas",
"oPaginate": {
"sNext": "Siguiente",
"sPrevious": "Anterior"
}
},
"sPaginationType": "scrolling"
});
$('#EventosFecha').dataTable( {
"aaSorting": [[ 2, "desc" ]],
"oLanguage": {
"sLengthMenu": 'Mostrando '+
'10'+
'20'+
'30'+
'40'+
'50'+
'Todos'+
' filas por pagina',
"sZeroRecords": "No se encontro nada - Lo siento",
"sInfoEmpty": "Mostrando 0 de 0 de un total de 0 filas",
"sInfoFiltered": "(Resultado de un total de _MAX_ filas)",
"sSearch": "Buscar:",
"sInfo": "Mostrando del _START_ al _END_ de un total de _TOTAL_ filas",
"oPaginate": {
"sNext": "Siguiente",
"sPrevious": "Anterior"
}
},
"sPaginationType": "scrolling"
} );
} );
[/code]
This discussion has been closed.
Replies