mjackson / mjackson/shadowbox

Shadowbox is not defined

Open
#45 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
293
Forks
110
PR merge metrics
No merged PRs in 30d

Description

Shadowbox is not defined error when i call Shadowbox.init()
why?

the code:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Documento senza titolo</title>
<script type="text/javascript" src="shadowbox/shadowbox.js"></script>
<link href="shadowbox/shadowbox.css" rel="stylesheet" type="text/css">
</head>
<body>
<a rel="shadowbox" href="promo.jpg">Clicca qui</a>
</body>
</html>
<script language="javascript">

    Shadowbox.init();
    Shadowbox.open(img, { player: 'iframe' });

</script>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the HTML example and inspect the browser console and network result for shadowbox/shadowbox.js before Shadowbox.init() runs. Trace why the Shadowbox global is unavailable, then verify the example loads the library and no longer raises the reported ReferenceError when initialization is called.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.