Can't Configure Shadowbox To Open As Soon As Page Loads
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 293
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
Hi MJ and Crew,
Thanks for this great tool! I'm using v3.0.3 and it's very elegant. However, I noticed an issue. I can't tell when the Shadowbox object on the page has been fully initialized. When I try to open a Shadowbox as soon as the page loads, I keep getting: "TypeError: aa is undefined".
I've tried passing a call back function into the Shadowbox.init() function to open a Shadowbox, yet as the source code comments reveal, the onReady() function is; "A function that will be called as soon as the DOM is ready". It seems the onReady handler itself is not waiting until Shadowbox is fully initialized to run the callback.
We own a license to Shadowbox and would love to keep using it in some kick-*** sites, however, the inability for a user to navigate to an emailed link and view a video in a Shadowbox as soon as they land is disheartening. Can you please add a 'Shadowbox.isReady' property or function to the framework so that users can tell when to call Shadowbox.Open?????
Thanks,
-Anthony
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the initialization flow from Shadowbox.init() and its onReady() callback, then inspect how Shadowbox.Open is invoked during page load. Define completion as providing a reliable way to determine when Shadowbox is fully initialized so an emailed link can open its content without the reported TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100