I’m appending values into a div through jQuery, but I’ve realized what gets appended isn’t affected by my javascript functions.
$(".div").append("<input type='text' class='textForm' placement='Value' />");
What I have setup in my javascript code is that it takes the attribute placement of any class “textForm” and makes it a value. But I’ve realized that once a value is appended, it isn’t effected by my javascript. Any ideas on how to fix this issue?
I guess you have some events bounded to some elements like which are not working after the append . something like this.
If you want the same functionality to work on the newly injected( dynamically added via append /jquery ajax etc…) DOM elements, you should consider using jquery
on. So your code should be changed like thisonwill work for current and future elements