I have 2 separate scripts that essentially do the same thing. I built them over time and just discovered I am using a couple different means to get to the same result.
I want to standardize and use the best practices method in both cases.
One way I test a change event is this:
$('input[name="status"]').change(function() {});
Another way I am testing a change event is this:
$("#email").bind("change", function(e) {});
Which way is best? What is the difference between the 2?
Thanks for helping me understand this.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…