Picture not loading with Shadowbox

68 Views Asked by At

I have added Shadowbox to my HTML page to popup an image on page load. The page load and the image popup comes up and says "Loading" and the picture is not displayed. I am using an image that it's only 64kb

    <!--shadowbox-->
<link rel="stylesheet" type="text/css" href="css/shadowbox.css">
<script type="text/javascript" src="js/shadowbox.js"></script>
<script type="text/javascript">
    Shadowbox.init({
    // skip the automatic setup 
    skipSetup: true
    });
    window.onload = function() {
    // open ASA the window loads
    Shadowbox.open({
    content:    '<img src="images/Xmas-Mobarak.jpg" alt="alt" />',
    player:     "img",
    title:      "Merry Christmas",
    height:     313,
    width:      500
    });
    };
</script>

The site

1

There are 1 best solutions below

0
On

I found my issue.

replaced this content:

'<img src="images/Xmas-Mobarak.jpg" alt="alt" />',

with

content:   'images/Xmas-Mobarak.jpg',