Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ive never used Zclip so hopefully im helpful, including that other correct element problem:</p> <p>When using <code>&lt;.. id='..'</code> you need to make sure each is unique or else the DOM breaks : Instead of <code>&lt;p id="copy"&gt;</code> use something like <code>&lt;p id="{{_id}}" class="copy"&gt;</code></p> <p>I try to access the templates data with <code>this.data</code></p> <pre><code>Template.copy.rendered = function() { $('#' + this.data._id).zclip({ path:"http://www.steamdev.com/zclip/js/ZeroClipboard.swf", copy:this.data.name }); } } </code></pre> <p>And so each copy click works use this style of template</p> <p>HTML:</p> <p>I've split up the list so that copies is in its own template so the rendered function above can get its own <a href="http://docs.meteor.com/#template_data" rel="nofollow">data context</a></p> <pre><code>&lt;template name="list"&gt; {{#each copies}} {{&gt;copy}} {{/each} &lt;/template&gt; &lt;template name="copy"&gt; &lt;p id="{{_id}}" class="copy"&gt;{{name}}&lt;/p&gt; &lt;/template&gt; </code></pre> <p><strong>EDIT</strong></p> <p>1) Add JQuery using Meteor instead of with <code>&lt;script&gt;</code> use the meteor package: In your project directory add JQuery:</p> <pre><code>meteor add jquery </code></pre> <p>2) Add the file at <a href="http://www.steamdev.com/zclip/js/jquery.zclip.min.js" rel="nofollow">http://www.steamdev.com/zclip/js/jquery.zclip.min.js</a> to a folder in your project at <code>client/lib</code></p> <p>The error occurs because zclip hasn't yet loaded yet.</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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