Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I show multiple, manually opened fancybox galleries?
    primarykey
    data
    text
    <p>I am trying to display several multiple, manually called image galleries using fancybox. I can get one gallery working, but the second will not open. Here is the code : </p> <p>JAVASCRIPT</p> <pre><code> $(document).ready(function() { $('.fancybox').fancybox(); /* MANUAL OPEN */ $("#fancybox-manual-c").click(function(){ $.fancybox.open([ { href : 'image1.jpg', rel : 'set01', title : 'My title' }, { href : 'image2.jpg', rel : 'set01', title : '2nd title' }, { href : 'image3.jpg', rel : 'set02', title : '3rd title' }, { href : 'image4.jpg', rel : 'set02', title : '4th title' } ]); }); /* END OF MANUAL OPEN */ }); </code></pre> <p>HTML</p> <pre><code> &lt;div&gt; &lt;a id="fancybox-manual-c" rel="set01" href="javascript:;"&gt;&lt;img src="thumbnail01.jpg"&gt;&lt;/a&gt; &lt;/div&gt;&lt;!-- END OF PICTURE THUMBS --&gt; &lt;div&gt;&lt;hr /&gt;&lt;/div&gt; &lt;div&gt; &lt;a id="fancybox-manual-c" rel="set02" href="javascript:;"&gt;&lt;img src="thumbnail02.jpg"&gt;&lt;/a&gt; &lt;/div&gt;&lt;!-- END OF PICTURE THUMBS --&gt; </code></pre> <p>I eventually want to somehow call the images so that I'm not having to add lines of code to the file every time I want to upload a picture, but so far I'm struggling to even get two instances working correctly.</p> <p>Note that I am using fancybox with other links on the page that are working as is, and on the same page I am also calling YouTube videos with no issues, and I have also tried some of the more popular questions with answers on here with no success.</p> <p>Also, I'm pretty sure I made a mistake copying over sections of that JS code - so any errors with regards to the closing brackets at the end are typos.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload