Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fancybox won't load inline content

To make things easy, here's the site - http://schnell.dreamhosters.com/folio/pixelread.php View the source code all you like.

The middle button of the top bar in your browser window that says "Palette" is supposed to open up a fancybox in the middle of the screen, and that box should load into it the data inside the element with id of 'data', but it doesn't and comes up with an error message of "The requested content cannot be loaded. Please try again later." I took this example straight from the fancybox website and double-checked that all the CSS, image and JS files are in their proper place and loaded. So now I'm lost and no idea how to do/fix this.

PS - I use Google Chrome 6.0. I'll see if this happens in IE8 or Firefox.

PPS - Found a solution. I can force the HTML content that goes into a fancybox by using the 'content' property. Using that and jQuery I can easily stuff a box with whatever I want. Thanks for the help guys.

like image 381
Mathias Schnell Avatar asked Jul 02 '26 04:07

Mathias Schnell


2 Answers

Found a solution. I can force the HTML content that goes into a fancybox by using the 'content' property. Using that and jQuery I can easily stuff a box with whatever I want. Thanks for the help guys.

like image 187
Mathias Schnell Avatar answered Jul 03 '26 16:07

Mathias Schnell


I think the problem is that fancybox isn't recognizing your content as being inline (not exactly sure why, but maybe something to do with the query string in the url, since it works when that isn't present).

I would try adding the explicit type: inline to your fancybox declaration:

$("a#inline").fancybox({'type':'inline'}); 
like image 36
idrumgood Avatar answered Jul 03 '26 18:07

idrumgood



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!