Sunday, October 29, 2017

# tech

jquery select box color change

iwant to change select box's backgroud-color . $(document).on("change", "select", function(e){ e.preventDefault(); if ($(this).val() != "") { $(this).css({"background-color" : "chagne color"}); }else{ $(this).css({"background-color" : "default color"}); } });

No comments:

Post a Comment