Home  >  Article  >  Backend Development  >  Bind click event after jq

Bind click event after jq

WBOY
WBOYOriginal
2016-08-08 09:24:041089browse

//Bind the event after live (get the generated object after dynamic generation)
                                                                                                                                                                                       If the value is equal to empty, add this tr to the background and change the value of the hidden field to the ID value of tr
                                                                                                                       .css("background", "#009900");
            var a = $(this).attr('id');
                                               / Otherwise, change the background of this tr to white and change the value of the hidden field to empty
          }else{
                  $(this).css("background", ''); attr("value", '');
        }
        });
The above introduces the jq post-binding click event, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn