Posts Tagged ‘fancybox’

jQuery fancybox with ajax content.

October 1st, 2010 1 comment

There are several ways to do this I guess. What I wanted was a default css class which I could apply to an anchor tag and have a specific part of the content loaded in fancybox. This is what I came up with. It is also possible to do this with the ajax property of fancybox itself I suppose.

$(function () {
        function (event) {
            var url = jQuery(this).attr("href");
                function (data) {
                    var content = jQuery(data).find("#content");
Categories: jQuery Tags: , ,