I am trying to replace/substitute one of the jQuery targets below (not the HTML element), depending on which language is selected by the user.
For example, if user chooses English as language, I want to remove #English target, but keep the others (i.e. #Spanish, #German).
How can I do this?
$( "#English, #Spanish, #German").click function { blah, blah, blah };
Looks like you want to trigger the handler for an element only once, in that case use .one()
$( "#English, #Spanish, #German").one('click', function(){
})
Unbind the id click event
$("#English, #Spanish, #German").click( function(){
$(this).unbind('click');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With