Facebox div showing in-page rather than as popup

86 views
Skip to first unread message

Alex Ullrich

unread,
Feb 1, 2012, 8:21:30 AM2/1/12
to facebox
I'm using jquery 1.7.1 and facebox 1.3.

Also made the modification suggested here:
http://groups.google.com/group/facebox/browse_thread/thread/5b86d1ae3e234a30

I'm using the following method to bind the facebox links:

function BindFaceboxLinks(unbind) {
//$.live() doesn't work w/ facebox, need to re-bind when content
is reloaded
if (unbind) {
$('a.facebox').unbind();
}
$('a.facebox').bind('click', function () {
updateTargetId = this.rel;
}).facebox();

//on reveal, need to bind new async forms and cancellation links
$(document).bind('reveal.facebox', function () {
$('.async-form').ajaxForm(function (responseText) {
$('#' + updateTargetId).replaceWith(responseText);
$.facebox.close();
BindFaceboxLinks(true);
updateTargetId = null;
});

$('.facebox-cancel').bind('click', function () {
$.facebox.close();
updateTargetId = null;
return false;
});
});
}

A lot of the code I'm recycling from what I used with facebox 1.2 /
jquery 1.4.2 - is there anything obviously wrong with the setup? I'm
willing to downgrade if need be.

Thanks

Alex

Alex Ullrich

unread,
Feb 1, 2012, 9:40:02 AM2/1/12
to facebox
I guess I should have included that the html I'm trying to load from
the other page is inserted at the bottom of my existing page.

Dan Rumney

unread,
Feb 25, 2012, 12:31:30 PM2/25/12
to facebox
I has this problem until I realised that I wasn't including the
Facebox CSS file in my header.
Reply all
Reply to author
Forward
0 new messages