How to fire event on future dom elements
I cant get my function to fire on elements that are added to dom after domready
Im trying to remove an input box if it's cleared out by backspace or however
- $(".CC").on("keydown", ".CC", function(){
- var $this = $(this).val();
- console.log($this);
- if ($this == "") {
- var $id = $(this).attr("id");
- $("#" + $id).remove();
- }
- });
Do not exist during domready