Abhishek Singh
Abhishek Singh

Reputation: 131

Shadowbox pop up not working

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Title</title>

<!-- Set paramètres pour le shadowbox (CSS, JS? . . .) -->
<link rel="stylesheet" type="text/css" href="shadowbox.css">
<script type="text/javascript" src="shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init({
    // let's skip the automatic setup because we don't have any
    // properly configured link elements on the page
    skipSetup: true
});

window.onload = function() {
    // open a welcome message as soon as the window loads
    Shadowbox.open({
        content:    'https://www.google.co.nz/images/srpr/logo11w.png',
        player:     "img",
        title:      "Welcome",
        height:     350,
        width:      350
    });

};
</script>
</head>

<body>
<h1>Hello World</h1>
<a href="WELCOMEOFFER.jpg" rel="shadowbox" title="My Image">My Image</a>
</body>
</html>

The above code is not working any help is accepted. I am trying to add popup onLoad but the shadowbox is not working onClick is working.

Upvotes: 1

Views: 241

Answers (0)

Related Questions