php - combine multiple id into one event jquery -


i have 3 text field needs have jquery click event

$('#landline' or '#mobile_number' or '#alternate_number').click(function() { $(this).val(""); }); 

i want implement whenever user click field id landline or mobile_number or alternate_number value set null. code didn't work.

use , concatenate multiple selectors:

$('#landline, #mobile_number, #alternate_number').click(function() {     $(this).val(""); }); 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -