194
rated 0 times
[
195]
[
1]
/ answers: 1 / hits: 19537
/ 11 Years ago, tue, october 8, 2013, 12:00:00
I have a function I'd like to do whenever either user clicks one of the anchor elements, such as this
$('.element').on('click', function(){
// do stuff here
});
and I want to do the same thing if a select element has changed its value, such as this
$('select').on('change', function(){
// do same stuff here
});
I know I could do
$('.element', 'select').on('click change', function(){
// do stuff here
});
but that would also trigger whenever I click on the select element and I don't want to confuse user and do something then, just when the select element value has changed.
More From » jquery