There is a link on my menu that send a user to a page where, if he used that specific link, triggers an action (it adds a class to a div element).
Right now I'm doing it with php with a link like : /mypage.php?action=go
and on mypage.php I check with php with : if(isset($_GET['action']) && $_GET['action'] == go)
and then the php code is executed
However I would like to do this in a JS equivalent, so instead of php I'd be able to trigger a JQuery action. I'm not very experienced with JS/JQuery, how can I do that properly ?
the script JS script that would be trigger is something along
$("#div1").toggleClass("class-triggered");