There is a switch. Works great when you press the buttons. Asked to add the ability to switch it with the mouse wheel. I broke my head I can not figure out how to do it. help plz. parent block if that div class = "main.content"
createChartTogglersListeners: function() { $('.toggler').click(function() { $('.toggler').removeClass('toggler_active'); var toggler = $(this); toggler.addClass('toggler_active'); }); } this.createChartTogglersListeners(); .togglers-container { position: absolute; display: block; top: 43%; right: 13px; width: 26px; padding: 3px 0; border-radius: 15px; background-color: inherit; } .toggler { -webkit-transition: all .3s; -moz-transition: all .3s; -ms-transition: all .3s; -o-transition: all .3s; transition: all .3s; width: 22px; height: 22px; padding: 7px; margin: auto; cursor: pointer; } .toggler i { display: block; width: 100%; height: 100%; border-radius: 50%; background-color: #d0d4d7; } .toggler:not(:first-child) { margin-top: 15px; } .toggler.toggler_active { padding: 0; } .toggler.toggler_active i { background-color: #ed1b24; -webkit-box-shadow: 0px 0 35px 0px rgba(237, 28, 36, .35); -moz-box-shadow: 0px 0 35px 0px rgba(237, 28, 36, .35); -ms-box-shadow: 0px 0 35px 0px rgba(237, 28, 36, .35); -o-box-shadow: 0px 0 35px 0px rgba(237, 28, 36, .35); box-shadow: 0px 0 35px 0px rgba(237, 28, 36, .35); } <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script type="text/javascript" src="jquery-1.2.6.js"></script> </head> <body> <div class="togglers-container"> <div class="toggler toggler_active" id="pole-chart-toggler"><i></i></div> <div class="toggler" id="line-chart-toggler"><i></i></div> <!--<div class="toggler" id="pie-chart-toggler"><i></i></div>--> <div class="toggler" id="all-chart-toggler"><i></i></div> </div> </body> </html>