jQuery Mobile in the examples - <input type="checkbox" data-role="flipswitch">

<input type="checkbox" data-role="flipswitch">

<input type="checkbox" data-role="flipswitch">

<!DOCTYPE html>
<html>
<head>
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.css" />
   <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
   <script src="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.js"></script>
</head>
<body>
<div data-role="page">
   <div data-role="header" data-position="fixed"><H1>Header</H1></div>
   <div role="main" class="ui-content">
    <form>
      <label for="flip-checkbox-1">Flip toggle switch checkbox:</label>
      <input type="checkbox" data-role="flipswitch" name="flip-checkbox-1" id="flip-checkbox-1">
      <label for="flip-checkbox-2">Flip toggle switch checkbox:</label>
      <input type="checkbox" data-role="flipswitch" name="flip-checkbox-2" id="flip-checkbox-2"
      <label for="flip-checkbox-3">Flip toggle switch checkbox:</label>
      <input type="checkbox" data-role="flipswitch" name="flip-checkbox-3" id="flip-checkbox-3"
      <label for="flip-checkbox-4">Flip toggle switch checkbox:</label>
      <input type="checkbox" data-role="flipswitch" name="flip-checkbox-4" id="flip-checkbox-4" checked="">
    </form>
  </div>
  <div data-role="footer" data-position="fixed"><H1>Footer</H1></div>
</div>
</body>
</html>
Pobierz kod