cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

    %meta{ :charset => "utf-8" }
    %title "iOS7 Toggle"
    %script{ :src => "//code.jquery.com/jquery-latest.min.js" }

      Created by
      %a{ :href => "https://twitter.com/iDuuck" } Dominik Schmidt
      Inspired by
      %a{ :href => "https://twitter.com/iDuuck" } Daniel Eden
              @import compass

  box-sizing: border-box
  font: 13px/24px "Helvetica Neue", sans-serif

  position: absolute
  top: 50%
  left: 50%
  margin-top: -16px
  margin-left: -35px

    position: relative
    background: #e1e1e1
    padding: 2px
    width: 70px
    box-shadow: inset 0px 0px 0px 2px darken(#e1e1e1, 2)
    height: 32px
    border-radius: 16px

    transition: all .4s ease-in-out

      box-shadow: inset 0px 0px 0px 30px #57de72

          margin-left: 30px

        margin-left: 38px

      // box-shadow: inset 0px 0px 0px 30px #57de72

        width: 36px

      position: relative
      z-index: 3
      background: white
      height: 28px
      width: 28px
      border-radius: 14px
      transition: all .2s ease-in-out

  position: absolute
  left: 10%
  right: 10%
  text-align: center
  color: #999
  bottom: 15px
  font-size: 13px

    color: inherit
              $ ->
  $('.toggle').mouseup ->
    $(@).toggleClass 'active'
Loading ..................