I use facebox in the content that I downloaded ajax
Usually, the plugin deletes the previous content, therefore, several times clicking on the same link will still show one image.
But not used with live. He will add images
Setting this empty below will not work? Does he already do this in the plugin?
$('a[rel*=facebox]').live("mousedown", function() {
if( $('#facebox .content div').length > 0 ) $('#facebox .content div').empty();
a = $('#facebox .content div').length;
$('#counter').html(a);
$(this).facebox();
});
(The length of the div actually says 0, but still shows the full stack)
How can I do this work live?
thanks Richard
source
share