Efficent function replaceWith for multiple classes
<p>The second "click" function of this script doesn't work, I think it's simply a syntax issue. I'm quite new to this. But I need to find a simple way call the live "click" function once for an array of vars.</p>

<p>The script works, just not the second part.</p>

<p>I'm looking for an efficient way to replaceWith an array of different vars, each matching a classed link, and without creating a new function every time.</p>

<p>Any suggestions would be great!</p>

<p>Thanks in advance</p>

<pre><code>&lt;script type="text/javascript"&gt;

    $(window).load(function(){

        $('a.pow').live("click",function(e) {

            webgl = $('&lt;iframe src="http://s..."&gt; &lt;/iframe&gt;');
            e.preventDefault();     
            $('#slider-wrapper').replaceWith(webgl);
        });

        $('a.biff').live("click",function(e) {

            video = $('&lt;iframe src="http://s..."&gt; &lt;/iframe&gt;');
            e.preventDefault();
            $('#slider-wrapper').replaceWith(video);    
        });
    });

&lt;/script&gt;
</code></pre>

<p>html</p>

<pre><code>&lt;div id="slider-wrapper"&gt;
    &lt;div&gt;
        &lt;a class="pow" href=""&gt;
        &lt;/a&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &lt;a class="biff" href=""&gt;
        &lt;/a&gt;
    &lt;/div&gt;
</code></pre>

<p>next one could be..</p>

<pre><code>    &lt;div&gt;
        &lt;a class="batman" href=""&gt;
        &lt;/a&gt;
    &lt;/div&gt;
&lt;/div&gt;&lt;-- close slider wrapper --&gt;
</code></pre>
