Jquery Dynamic fancy box

Posted by MrThomas on Stack Overflow See other posts from Stack Overflow or by MrThomas
Published on 2010-04-09T17:23:35Z Indexed on 2010/04/09 17:43 UTC
Read the original article Hit count: 225

Filed under:

Loading fancybox from Jquery how can I retrieve the contents of a div ID on a page and not the whole page. This is my code so fare which gets me the whole page:

$(function() {

$(".style_image a").live('click', function(event) { 

    $(".style_image a").fancybox();
    return false;       

});
}); 

I have also tried the following with no success:

$(function() {

$(".style_image a").live('click', function(event) { 

    $(".style_image a" + "#show_style").fancybox();
    return false;       

});
});

I'm not sure how this is done as there is little info on the fancy box docs. I wish this to be done dynamically not inline.

© Stack Overflow or respective owner

Related posts about jQuery