fnDrawCallback problem facebox
fnDrawCallback problem facebox
davisvasconcellos
Posts: 12Questions: 2Answers: 0
Works fine at the first load, but in any datatables events , plugins reload more instances..
Script:
$(document).ready( function() {
$('#contactList').dataTable({
/* Disable initial sort */
"aaSorting": [],
"bRetrieve": false,
"bDestroy":true,
"fnDrawCallback": function( oSettings ) {
$("*[rel=facebox]").facebox ();
}
});
})
html:
<%=rsContatos("apelido")%>
in first time if i click. popup facebox appears correctly with only one content
johnDoe [Click to details] -> popup apears:
[username:bla, email:bla@email.com, cel:bla ]
so if i click on next and go back.
johnDoe [Click to details] -> popup apears:
[username:bla, email:bla@email.com, cel:bla ]
[username:bla, email:bla@email.com, cel:bla ]
click on next go back again
[username:bla, email:bla@email.com, cel:bla ]
[username:bla, email:bla@email.com, cel:bla ]
[username:bla, email:bla@email.com, cel:bla ]
search john(see 4 chars) and click on result
[username:bla, email:bla@email.com, cel:bla ]
[username:bla, email:bla@email.com, cel:bla ]
[username:bla, email:bla@email.com, cel:bla ]
[username:bla, email:bla@email.com, cel:bla ]
I am SAD and crazy
Whats wrong?
Thanks
Script:
$(document).ready( function() {
$('#contactList').dataTable({
/* Disable initial sort */
"aaSorting": [],
"bRetrieve": false,
"bDestroy":true,
"fnDrawCallback": function( oSettings ) {
$("*[rel=facebox]").facebox ();
}
});
})
html:
<%=rsContatos("apelido")%>
in first time if i click. popup facebox appears correctly with only one content
johnDoe [Click to details] -> popup apears:
[username:bla, email:bla@email.com, cel:bla ]
so if i click on next and go back.
johnDoe [Click to details] -> popup apears:
[username:bla, email:bla@email.com, cel:bla ]
[username:bla, email:bla@email.com, cel:bla ]
click on next go back again
[username:bla, email:bla@email.com, cel:bla ]
[username:bla, email:bla@email.com, cel:bla ]
[username:bla, email:bla@email.com, cel:bla ]
search john(see 4 chars) and click on result
[username:bla, email:bla@email.com, cel:bla ]
[username:bla, email:bla@email.com, cel:bla ]
[username:bla, email:bla@email.com, cel:bla ]
[username:bla, email:bla@email.com, cel:bla ]
I am SAD and crazy
Whats wrong?
Thanks
This discussion has been closed.
Replies
I'd suggest you just use fnInitComplete .
Allan
thanks
now only first page work.
$(document).ready( function() {
var oTable = $("#example2").dataTable({
"fnInitComplete": function(oSettings) {
$("*[rel=facebox]").facebox ();
}
} );
} );
[code]
$("*[rel=facebox]", this.fnGetNodes()).facebox();
[/code]
Allan
GENIUS.
THANKS