How to append just one time
Hi every, I have this code:
$(function(){
$(".dialog_open").click(function(){
$(this).append('<input type="text" name="new_qty" id="new_qty" value="" width="5" />');
});
});
And this HTML markup:
<a class="dialog_open" onclick="javascript: return false" href="#">Rebajar</a>
When I click "Rebajar" the INPUT appears but any time I click in the INPUT one more appears and then another and another, why? What's wrong here?