<divclass="lightchoose"><aclass="light red off"style="cursor:not-allowed"href="javascript:void(0);"onclick="lightchoose('red')"></a><aclass="light green off"style="cursor:not-allowed"href="javascript:void(0);"onclick="lightchoose('green')"></a><aclass="light blue active"href="javascript:void(0);"onclick="lightchoose('blue')"></a><aclass="light yellow off"style="cursor:not-allowed"href="javascript:void(0);"onclick="lightchoose('yellow')"></a><aclass="light purple off"style="cursor:not-allowed"href="javascript:void(0);"onclick="lightchoose('purple')"></a><aclass="light cyan off"style="cursor:not-allowed"href="javascript:void(0);"onclick="lightchoose('cyan')"></a></div>
functionlightchoose(color){var dom ='.'+ color;if($(dom).hasClass('off')){return}$(dom).toggleClass('active');if($(dom).hasClass('active')){$(dom).siblings().attr('style','cursor:not-allowed');$(dom).siblings().addClass('off');}else{$(dom).siblings().removeAttr('style','cursor:not-allowed');$(dom).siblings().removeClass('off')}}