New switch style?

Hi I have no idea how to do this but I have a dashboard that would look great if I had a switch that looked like an old fashioned up/down toggle switch that would fit in a 2x1 widget grid.

Anyone done anything like this?

You can do this pretty easily, if you have images for the toggle switches. Look at the following code:

<div ng-if="itemValue('Back_Porch_Light')=='OFF'">
  <button class="btn btn-lg" style="color: black" ng-click="sendCmd('Back_Porch_Light', 'ON')">
    <i class="glyphicon glyphicon-menu-down"></i>
  </button>
</div>

<div ng-if="itemValue('Back_Porch_Light')=='ON'">
  <button class="btn btn-lg" ng-click="sendCmd('Back_Porch_Light', 'OFF')">
    <i class="glyphicon glyphicon-menu-up"></i>
  </button>
</div>

This will create a button showing a down arrow when the switch is off, and a button showing an up arrow when the switch is on. Clicking the button will have it swap out. You could replace the icons with image links. Just drop the images you want in your static html directory, and replace change it from

    <i class="glyphicon glyphicon-menu-down"></i>

to

    <img src="http://[your-host-or-ip]:8080/static/image.png"></img>

@Signal11 could you explain where that code would need to be used?