How can I get elements I add with jQuery to follow the actions I've applied to a class?
<p>I've found out that when I use jQuery to add something to a page (via <code>.append</code> ) then the class actions I've set don't seem to apply to the new elements. <br />For example in my <code>$(document).ready</code> function I'll add a <code>$(".clickable").click(doSomething)</code> it works for anything that's on the page before it's called, but if I append something with a <code>clickable</code> class, then the new element won't be clickable even if it has a <code>clickable</code> class.</p>

<p>While I was posting I tried and realized that I could get around this by recalling the <code>$(".clickable").click(doSomething);</code> after adding the elament, but that just makes it call doSomething more times for every element I add. <br />In other words if I added 5 elements when I click on a clickable class doSomething would be called 5 times in a row for 1 click. </p>

<p>I'm wondering if there is a more elegant solution so I don't have to recall any jQuery actions everytime I add an elament, perhaps there's a smarter method than append? </p>
