Cupcake
Cupcake

Reputation: 69

Fancybox ajax The requested content cannot be loaded

i am trying to use fancy box, a simple fancy box with no class binding just to display a message... but all i get is "The requested content cannot be loaded. Please try again later." although i copied the js from the official page at github... Any Ideas?

 $.fancybox('<div><h1>Lorem Lipsum</h1><p>Lorem lipsum</p></div>', {
                title : 'Custom Title',
                width:800,
                height:450
            });

You can check my example as jsfiddle

Upvotes: 0

Views: 411

Answers (1)

JFK
JFK

Reputation: 41143

Use content instead

$(document).ready(function () {
    $.fancybox({
        title: 'Custom Title',
        width: 800,
        height: 450,
        content: '<div><h1>Lorem Lipsum</h1><p>Lorem lipsum</p></div>'
    });
});

See your updated JSFIDDLE

Upvotes: 1

Related Questions