Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does fancybox require two clicks activate?
    primarykey
    data
    text
    <p>jQuery</p> <pre><code> &lt;script type="text/javascript"&gt; jQuery(document).ready(function () { jQuery("a.fancybox_videojs").click(function(e) { e.preventDefault(); var url = jQuery(this).attr('title'); var rel = jQuery(this).attr('rel'); var img = jQuery(this).children('img').attr('src'); jQuery(this).fancybox({ 'overlayOpacity' : &lt;?php echo get_option('fancybox_overlayOpacity'); ?&gt;, 'overlayColor' : '&lt;?php echo get_option('fancybox_overlayColor'); ?&gt;', 'hideOnContentClick' : false, 'content': '&lt;div&gt;&lt;div class="video-js-box vim-css"&gt;' + '&lt;video id="example_video_1" class="video-js" width="650" height="370" controls="controls" preload="auto" poster="' + img + '"&gt;' + [...omitted...] '&lt;/video&gt;' + '&lt;/div&gt;&lt;/div&gt;', 'titleShow' : false, 'onComplete': function () { jQuery("#fancybox-inner").css({ 'overflow': 'hidden' }); VideoJS.setupAllWhenReady(); }, 'onClosed': function () { jQuery("#fancybox-inner").empty(); } }); }); }); &lt;/script&gt; </code></pre> <p>HTML</p> <pre><code>&lt;div class="content-wrap container_12"&gt; &lt;div class="work_cat alpha"&gt; &lt;a href="" id="##"&gt;&lt;/a&gt; &lt;/div&gt; &lt;div class="work_col"&gt; &lt;div class="work_cell" id="thumb_##"&gt; &lt;a class="fancbox_videojs" href="" title="" rel=""&gt;&lt;img src=""&gt;&lt;/a&gt; &lt;a class="fancbox_videojs" href="" title="" rel=""&gt;&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="work_col"&gt;&lt;/div&gt; &lt;div class="work_col omega"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>I have two problems here.</p> <ol> <li>It takes two clicks to bring up the fancybox.</li> <li>I want the link in <code>.work_cat</code> to also bring up the fancybox, but it has to get the variables from the coresponding <code>.work_cell</code></li> </ol> <p>I omitted part of the jQuery code so it would not be too long. If you need to see it, I will post it up</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.
    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