javascript - Release toggle effect when clicking on another link -
i have javascript causes link change background color when clicked:
$(".button").click(function(){ $(this).css('background-color', '#555'); });
and works, color toggle off when click on link.
you can this
$(function() { $(".button").click(function() { $(this).css('background-color', '#555'); $(".button").not($(this)).css('background-color', ''); }); });
Comments
Post a Comment