I've created a web page of a large photo album. Each enlarged photo has a caption that includes one to three footnote references that I created using Pop Box Magic. All work very well.
My concern deals with page size. There are approximately 75 PBX instances on page 1 of my multi-page photo album. The completed page totals 200 kb. I want to reduce that size to make the page load faster.
Of the page's 75 PBX instances, there are 10 that are duplicate footnote references. Can the JavaScript be modified so that I could create one PBX instance that could be activated by 10 different triggers found in a variety of the page's photo captions.
Unfortunately, after attempting to insert one instance that has ten different triggers, each PBX instance opened as expected, however, none of them closed when the X icon was clicked. So I've replaced the ten instances, giving each its own trigger number, thereby increasing the page size.
. . . If the JS could be changed to enable multiple triggers to activate one single PBX instance, which could be closed as expected when clicking the X icon, I could shave the page size considerably, as shown in this comparison.
Here's my TEST page with 75 or so PBX instances. It's 200 kb in size. . .
https://www.warrencampdesign.com/peter/peter-masterpieces.pg1-TEST.php
Here's the same page with 10 of the same PBX instances removed. The page size dropped to 176 kb. . .
https://www.warrencampdesign.com/peter/peter-masterpieces.pg1-TEST-empty.php
And, because there are a number of other repeating PBX footnotes on this page, the page size could easily become 150 kb if I could change the JS so it enables multiple triggers for a single PBX instance.
Can the JS be easily modified to accomplish this streamlining task, Gerry? I hope it can because my completed photo album will have at least a dozen pages, each of which will likely have the current 200kb size, which I want to decrease without reducing the number of photos on each page.
I thank you, in advance, for considering this unique request.
Warren