Why does facebox fadeout rather than remove ?

4 views
Skip to first unread message

Jade

unread,
Jul 3, 2009, 12:42:31 AM7/3/09
to facebox
Is there a clear performance benefit from hiding the html and keeping
it in the DOM as opposed to continually removing and adding it?

I have some functions that look for whether or not a facebox has been
called. It returns true since the facebox is still in the dom, just
hidden. I can easily fix this by removing the facebox, but would like
some insight on any performance hits I may take.

Anyone with this kind of knowledge? Thanks.

For reference here is the close function:

$(document).bind('close.facebox', function() {
$(document).unbind('keydown.facebox')
$('#facebox').fadeOut(function() {
$('#facebox .content').removeClass().addClass('content')
hideOverlay()
$('#facebox .loading').remove()
})
})
Reply all
Reply to author
Forward
0 new messages