SO question

by Gerald Gillespie

HTML

<div id="imgform" />
<div id="#weird"/>

CSS

.div {
    padding : 20px;
   
}

JavaScript

function showUploadedItem() {
    $('#upload_process').show();
    // a bunch of other things to do
    $(this).prop('disabled', true);
    console.log("the submit button ID is: " + $(this).attr('id'));
} // end showUploadedItem

$('#imgform').text('nice selector');
$('#imgform').append("<center><input type='submit' value='Upload' id='imgupload'/></center>");

$('input').one('click', function () {
    showUploadedItem.call(this);
    alert('oh yeah, i also removed the handler using "one"');
}); // end one and done



$('div').each(function(){
    console.log($(this).attr('id'));
});