Append() only appending once, even on multiple calls...
append.php:
- <span>test</span>
jQuery function:
- $(function(){
$("a.role_link").click( function(){
$.get('append.php', function(data) {
$("#roleDiv").html(data).append();
$("#count").val( parseInt( $("#count").val() ) + 1);
});
});
})
HTML:
- <input type="hidden" name="count" id="count" value="0" />
<div id="roleDiv"></div>
<div><a href="#" class="role_link">Add</a></div>
The content will be added on the first click, but not on the subsequent clicks however. The hidden field gets incremented fine though.