Note that there are some explanatory texts on larger screens.

plurals
  1. POzeroclipboard element not working when located inside secondary/non-default jQuery tab
    primarykey
    data
    text
    <p>I've got a page with jQuery tabs, and I'm trying to link a div element inside a secondary tab with zeroclipboard. Unfortunately, it's not working because I suspect the secondary tab is initially hidden when the page is loaded.</p> <p>The html is the following:</p> <pre><code>&lt;span id="form" class="tabs tabs-normal grid100"&gt; &lt;!-- HEADER BUTTONS --&gt; &lt;div class="row_btns_header"&gt; &lt;button class="btn_neutral"&gt;Cancel&lt;/button&gt; &lt;button class="btn_primary last save"&gt;Save&lt;/button&gt; &lt;/div&gt; &lt;!-- TABS --&gt; &lt;div class="row"&gt; &lt;ul id="tabs-list"&gt; &lt;li&gt;&lt;a href="#blog"&gt;Blog&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#links"&gt;Links&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#images"&gt;Images&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#more"&gt;More..&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;!-- DEFAULT TAB --&gt; &lt;div id="blog" class="container"&gt; &lt;/div&gt; &lt;!-- LINKS TAB --&gt; &lt;div id="links" class="container"&gt; &lt;div id="embed" style="position: relative"&gt; &lt;a href="#"&gt;Copy into the clipboard&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- etc. --&gt; </code></pre> <p>The javascript is:</p> <pre><code>$(".tabs").tabs(); $("#embed").zclip({ path: "http://www.steamdev.com/zclip/js/ZeroClipboard.swf", copy: "aaaaaaaaaaaa" }); </code></pre> <p>zeroclipboard works correctly, if I move the #embed div inside the #blog div. I suspect this is because #blog is visible by default.</p> <p>Any ideas what I need to do in order to get the zeroclipboard element to work when it's located inside a secondary non-default tab?</p> <p>Much thanks.</p> <p>Bardi</p>
    singulars
    1. This table or related slice is empty.
    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.
    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