If else statement | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

If else statement

How would I write an if else or switch statement where if I click one link/button it would trigger one jquery effect or if I clicked another button it would trigger a different one?

7th Jun 2019, 5:44 AM
Alex Peterson
Alex Peterson - avatar
1 Answer
0
you can use events for this. Like $(selector).click(function(){ $(selector).hide(); }); where selector is any tag , class name , Id .
7th Jun 2019, 6:49 AM
Gaurav
Gaurav - avatar