This is because of jQuery. In jQuery, $('#id') is short for the JavaScript call
document.getElementById('id')
Using the # symbol means the ID attribute, like in CSS; using the . symbol would reference a class attribute. Here, I've given the form id="postAddForm" so, in jQuery, we must use $('#postAddForm') to update it, etc.