Tag Archives: DOM

jQuery – Bind event to newly inserted element

If you have inserted DOM objects into the HTML in $(document).ready(function() {…}). Those binded events will not applied to newly inserted DOM objects. In the following example, a new button is inserted whenever the .btn is clicked. but it is only valid for the first .btn button. Continue reading jQuery – Bind event to newly inserted element