The code in that example looks like this:

$('#displayExample a').click(function() {
    $('<img width="500" height="500">')
        .attr('src', $(this).attr('href'))
        .appendTo('#main')
        .displayBox();
    return false;
});


You can close the displayBox the way you want by changing that code to this:

$('#displayExample a').click(function() {
    $('<img width="500" height="500">')
        .attr('src', $(this).attr('href'))
        .appendTo('#main')
        // add click handler!
        .click($.blockUI.impl.boxRemove)
        .displayBox();
    return false;
});


Mike



On Jan 21, 2008 4:55 PM, alivemedia <[EMAIL PROTECTED]> wrote:

>
> I want to use blockui to show a product enlargement but I want it to
> close when the user clicks on the image.
>
> Here is the blockui sample page:
> http://www.malsup.com/jquery/block/#displaybox
>
> Anyone done this before?
>

Reply via email to