How can select an element generated by jQuery?
<p>I am trying to activate a slideDown() onclick with an element that has been generated by js.</p>

<p>I downloaded a script from ryanfait.com which allows you to customise the look of radio buttons. This works fine but when I try and apply an action to the generated element (in this case a span) it doesn't work. How can I work around this?</p>

<p>Here is my HTML:</p>

<pre><code>&lt;div class="radiocont"&gt;
                                &lt;label&gt;Yes&lt;/label&gt;
                                &lt;input type="radio" class="styled" value="yes" name="watertank" /&gt;
                            &lt;/div&gt;
                            &lt;div class="radiocont"&gt;
                                &lt;label&gt;No&lt;/label&gt;
                                &lt;input type="radio" class="styled" value="no" name="watertank" /&gt;
                            &lt;/div&gt;
</code></pre>

<p>When the DOM loads the inputs are replaced by spans that look like this:
<code>&lt;span class="radio" title="yes" style="background-position: 0pt 0pt;"&gt;&lt;/span&gt;</code></p>

<p>When you click on one of the spans I want to activate slideDown(). Here is my js:<code>$('[title="yes"]').click(function() {
  $(this).nextAll('.secondq:first').slideDown('slow');
});</code></p>

<p>Can anyone assist? </p>
