Quantcast
Viewing all articles
Browse latest Browse all 82152

fnDrawCallback problem facebox

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:
<td>
<a class="ticket open" rel="facebox" href="contactdetails.asp?iduserdetails=<%=rsContatos("codigo")%>" ><%=rsContatos("apelido")%></a>
</td>



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

Viewing all articles
Browse latest Browse all 82152

Trending Articles