Javascript: read number of any value
<p>I'm trying to apply a tooltip to a foreach loop, but I need the javascript to read the attribute "mystickytooltip" with a number at the end. </p>

<pre><code>&lt;div id="mystickytooltip{$smarty.foreach.cart.iteration}" class="stickytooltip"&gt;
</code></pre>

<p>Will output </p>

<pre><code>&lt;div id="mystickytooltip1" class="stickytooltip"&gt;
&lt;div id="mystickytooltip2" class="stickytooltip"&gt;
&lt;div id="mystickytooltip3" class="stickytooltip"&gt;
</code></pre>

<p>And I need the javascript to read "mystickytooltip(ANYVALUE)" is this possible? My JS knowledge sucks. </p>

<pre><code>//stickytooltip.init("targetElementSelector", "tooltipcontainer")
stickytooltip.init("*[data-tooltip]", "mystickytooltip")
</code></pre>

<p>Thanks.</p>
