简体   繁体   中英

shadowbox.js not working, only opening properly half the time

I am using the shadowbox.js code to pop open product details on my site. It works great about half the time. When it's not functioning properly, it opens the link page in the same window. For example, if you click on any of the image boxes at the top "Boombastic/Boombastic Plus" -or- "Team Pack Diamondista", it should pop up a window in the shadowbox. http://www.teamsportsplanet.com/sharedfiles/softballhome.php?sport=softball

<img src="images/LandingPage_Softball_TSP_teampack_01.jpg" /></a><a href="team-packs/softball-team-uniform-packages_2.html" title="Softball Team Packs" target="_new" rel="shadowbox" alt="Order Team Softball Uniform Packages">

They SHOULD be popping up in a shadowbox, with this page inside: http://www.teamsportsplanet.com/sharedfiles/team-packs/softball-team-uniform-packages_2.html

I don't know what it going on with this and wonder if it's just something in the JavaScript code itself.

It's a little hard to tell what's going on without the portion of your js that initializes shadowbox, but...

... since the box loads ok but not with the url you're expecting, make sure that

content: 

attribute is getting the correct url as it's value.

Per their docs :

**content** The value of the link's href attribute

Check that first.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM