The following is jQuery javascript code, except that I would like to add 2 functions to the button state.
When the user clicks one of the buttons, the other button that has not been pressed receives a new class (see).
Both button states should change to unclickable.
[div id = "1" class = "__ button_image"] [/ div]
[div id = "2" class = "__ button_image"] [/ div]
$ ("div .__ button_image"). mouseover (function () {
$ (this) .addClass ("__ button_image_hover");
});
$ ("div .__ button_image"). mouseout (function () {
jq (this) .removeClass ("__ button_image_hover");
});
$ ("div .__ button_image"). click (function () {
$ (this) .removeClass ("__ button_image_hover");
$ (this) .addClass ("__ button_image_clicked");
jQuery.get ('/ do / request');
});
source
share