Home Blog Page 4

Toastr – Simple javascript toast notifications for UI design

Toastr – Simple javascript toast notifications for UI design

toastr is a Javascript library for Gnome / Growl type non-blocking notifications. jQuery is required. The goal is to create a simple core library that can be customized and extended.

Demo

Demo can be found at http://codeseven.github.io/toastr/demo.html

CDNjs

Toastr is hosted at CDN JS

Debug

Minified

Quick start

3 Easy Steps

For other API calls, see the demo.

  1. Link to toastr.css <link href="toastr.css" rel="stylesheet"/>
  2. Link to toastr.js http://toastr.js
  3. use toastr to display a toast for info, success, warning or error
    // Display an info toast with no title
    toastr.info('Are you the 6 fingered man?')
    

Authors

Hans Fjällemark

John Papa

Tim Ferrell

Credits

Inspired by https://github.com/Srirangan/notifer.js/.

Copyright

Copyright © 2012-2014 Hans Fjällemark, John Papa & Tim Ferrell.

License

toastr is under MIT license – http://www.opensource.org/licenses/mit-license.php

 


Website: http://codeseven.github.io/toastr/
Demo: http://codeseven.github.io/toastr/demo.html 


 

Thanks for reading,
Web Editor

 

jQuery Notific8 – A notification plug-in inspired by the notifications introduced in Windows 8

jQuery Notific8 – A notification plug-in inspired by the notifications introduced in Windows 8

Notific8 is a notification plug-in that was originally inspired by the notifications introduced in Windows 8 with some web ready restyling and customizations. Notific8 has built in themes (colors) and theme families (styles) and is easy to create new theme and theme families for. The plug-in was born from a want for a simply designed yet modern and stylish notification system. The plug-in is also designed to scale based on the page’s font-size setting (it was designed for the default of 100%/16px as the default).

Features

  • Notifications slide in and out from the upper right corner of the page
  • Configurable life span of the notification
  • Option to display a heading
  • Option to pick an icon from the including icon font
  • Built in theme options with ability to create custom themes (see CSS for built in themes)
  • Ability to make the notification sticky
  • Ability to set up custom settings for reuse without having to type them over and over
  • Ability to set which corner the notifications are shown in
  • Ability to set the z-index
    • Can be set via config/configure or the z index function
  • Ability to customize close text on sticky notifications
  • Events for init, create, and close

Browser support

Currently supported and testing:

  • Chrome
  • Firefox
  • Safari (Mac only)
  • IE 10+
  • Edge

While not tested, this plug-in should work on Opera versions released after the rewrite on the blink rendering engine.

Browser version support

As a rule of thumb, only the most recent plus one version older of a browser is supported unless marked otherwise. While it may work in IE8 and IE9, notific8 will not be tested or officially supported in legacy browsers such as versions of IE older than 10.

Wiki

Please view the https://github.com/ralivue/jquery-notific8/wiki for information on the options available and how to implement them.


Website: https://github.com/ralivue/jquery-notific8

Demo: http://gsri1987.github.io/notific8-responsive/


 

Thanks for reading,
Web Editor

 

Text Heading Effects – Inspiration for Text Styles and Hover Effects

Text Heading Effects – Inspiration for Text Styles and Hover Effects

A couple of creative text styles and hover effects for your inspiration. Some effects use experimental techniques including SVG masking and Canvas.

When it comes to tiny animations and effects on text, be it a link, a typographic logo or an introductory sentence, there’s really no limit to the creative possibilities. So today we’d like to share a couple of text styles and hover effects with you to get your creative juices flowing. We hope you enjoy them and find them inspiring!

The markup for this effect is simply a link with a data attribute:
<a class="link link--kukuri" href="#" data-letters="Kukuri">Kukuri</a>

The common styles for all link effects are as follows: 
.link {
 outline: none;
 text-decoration: none;
 position: relative;
 font-size: 8em;
 line-height: 1;
 color: #9e9ba4;
 display: inline-block;
}

If you have a look at the Kukuri effect, you will see that, on hover, a bar appears by sliding in from the left. This bar will “drag” along the colored version of the text which we pack into the ::before pseudo element. We set the initial position of the bar to be outside of the link box which we set to overflow: hidden. 

The other pseudo element that contains the text copy will animate it’s width and because the text inside is set not to wrap, we create a “reveal”-like effect. This transition will happen after a delay, so that we first see the bar passing through. The timing function used for the bar adds some jazz:
.link--kukuri {
 text-transform: uppercase;
 font-weight: 900;
 overflow: hidden;
 line-height: 0.75;
 color: #b2b0a9;
}

.link--kukuri:hover {
 color: #b2b0a9;
}

.link--kukuri::after {
 content: '';
 position: absolute;gi
 height: 16px;
 width: 100%;
 top: 50%;
 margin-top: -8px;
 right: 0;
 background: #F9F9F9;
 transform: translate3d(-100%,0,0);
 transition: transform 0.4s;
 transition-timing-function: cubic-bezier(0.7,0,0.3,1);
}

.link--kukuri:hover::after {
 transform: translate3d(100%,0,0);
}

.link--kukuri::before {
 content: attr(data-letters);
 position: absolute;
 z-index: 2;
 overflow: hidden;
 color: #424242;
 white-space: nowrap;
 width: 0%;
 transition: width 0.4s 0.3s;
}

.link--kukuri:hover::before {
 width: 100%;
}




Webiste: http://tympanus.net/codrops/2015/05/13/inspiration-for-text-styles-and-hover-effects/

Demo: http://tympanus.net/Development/TextStylesHoverEffects/



Thanks for reading,
Web Editor

WebFont Medical Icons – Specialized Clinical & Medical web fonts pack for UI design

WebFont Medical Icons – Specialized Clinical & Medical web fonts pack for UI design

 

Specialized in the Clinical & Medical world  Free and easy to use!

The package includes: SVGs, PNGs (64×64), Webfont (.eot, .ttf, .woff, .svg)

Usage:
/js/lib/modernizr-2.6.2.min.js
/js/lib/respond.min.js
http://js/main.jshttp://js/bootstrap.min.jshttp://js/jquery.highlight.js

1 Copy the fonts folder

  • packages/webfont-medical-icons/fonts

2 Copy the css file

  • packages/webfont-medical-icons/wfmi-style.css

3 In the head html, reference the location to the css file

  • <link rel=“stylesheet” href=“../css/wfmi-style.css”>

4 Add classes to your elements

  • <span class=“icon-laboratory” aria-hidden=“true”></span>

Customization
/js/lib/modernizr-2.6.2.min.js
/js/lib/respond.min.js
http://js/main.jshttp://js/bootstrap.min.jshttp://js/jquery.highlight.js

<span class=“icon-neurology” aria-hidden=“true”></span>

.icon-neurology {font-size: 7em;}


/js/lib/modernizr-2.6.2.min.js
/js/lib/respond.min.js
http://js/main.jshttp://js/bootstrap.min.jshttp://js/jquery.highlight.js

Downloading icons as PNG

1 Click on the icon you want

2 Select the desired colour

3 Enter the desired size (in px)

4 Click on ‘Get PNG file’

5 Save PNG file (ctrl+s or cmd+s)


/js/lib/modernizr-2.6.2.min.js
/js/lib/respond.min.js
http://js/main.jshttp://js/bootstrap.min.jshttp://js/jquery.highlight.js

This project is designed and built with by @samcome.


Website: http://samcome.github.io/webfont-medical-icons/


Thanks for reading,
Web Editor

Blunicons – Blue colored flat icons (images) in PNG and SVG format

Blunicons – Blue colored flat icons (images) in PNG and SVG format

Here is a remarkable set of 60 essential icons designed in an unique manner. All icons are free to use in your various projects and are available in multiple formats.

Big thanks to uiSurf for providing us with this great resource.

Format: AI, SKETCH, SVG, PNG
Icon Dimensions: 48px
Pixel Perfect: Yes
Size: 933 Kb


Website: http://graphicburger.com/blunicons-60-essentials-icons/


 

Thanks for reading,
Web Editor

 

Simple Flat Line Icons Webfonts – Ideal for Menus, Tabs, Accordion and Buttons

Simple Flat Line Icons Webfonts – Ideal for Menus, Tabs, Accordion and Buttons

All 160 simple line icons are now embedded in a webfont for more convenient use on the web or in a native application. Big thanks to Jamal Jama for creating this awesome webfont.

 

Line Icon flat design

 


 

Website: http://graphicburger.com/simple-line-icons-webfont/

 


Thanks for reading,
Nabeel Shahid.

jQuery Pulsate – adds an effect that’s useful for focussing end user attention to a certain part of your webpage in a subtle way.

jQuery Pulsate – adds an effect that’s useful for focussing end user attention to a certain part of your webpage in a subtle way.

 

jQuery.pulsate started out as an experiment with outline-offset by Kilian Valkhof. By animating it you can create a pulsating effect that’s useful for focussing attention to a certain part of your webpage in a subtle way.

Usage

Simple example:

$(element).pulsate();

Custom options (defaults are shown)

$(element).pulsate({
  color: $(this).css("background-color"), // set the color of the pulse
  reach: 20,                              // how far the pulse goes in px
  speed: 1000,                            // how long one pulse takes in ms
  pause: 0,                               // how long the pause between pulses is in ms
  glow: true,                             // if the glow should be shown too
  repeat: true,                           // will repeat forever if true, if given a number will repeat for that many times
  onHover: false                          // if true only pulsate if user hovers over the element
});

Works in Chrome, Safari and Firefox. Prettiest in Firefox since it supports Outline-radius

 

It’s also available with basic feature in jQuery UI Effect animation http://jqueryui.com/effect/


 

Website/Demo: http://kilianvalkhof.com/jquerypulsate/


Thanks for reading,
Nabeel Shahid.

Web portals product tour (online interactive) framework with multilingual support – Hopscotch!

Web portals product tour (online interactive help) framework with multilingual support – Hopscotch!

 

Hopscotch is a framework to make it easy for developers to add product tours to their pages. Hopscotch accepts a tour JSON object as input and provides an API for the developer to control rendering the tour display and managing the tour progress.

Features

Event Callbacks

Callbacks for tour events: onStart, onEnd, onShow, onNext, onPrev, onClose, onError

Multi-page tours

Take your tour across pages! Hopscotch saves state using HTML5 sessionStorage if available and falls back to using cookies as a default.

i18n support

Create tours in all the languages of the world. Hopscotch supports customizing the language of your tour controls.

Lightweight Callouts

Create single instance callouts for those times when one is enough.

 

General Usage

To get started using the Hopscotch framework, simply include hopscotch.css and hopscotch.js on your page. This will load the hopscotch object into the global window object for you.


    <html>
      <head>
        <title>My First Hopscotch Tour</title>
        <link rel="stylesheet" href="css/hopscotch.css"></link>
      </head>
      <body>
        <h1 id="header">My First Hopscotch Tour</h1>
        <div id="content">
          <p>Content goes here...</p>
        </div>
        <script src="js/hopscotch.js"></script>
        <script src="js/my_first_tour.js"></script> <!-- define and start your tour in this file -->
      </body>
    </html>
        

Then in your my_first_tour.js file, define and start your tour.


    // Define the tour!
    var tour = {
      id: "hello-hopscotch",
      steps: [
        {
          title: "My Header",
          content: "This is the header of my page.",
          target: "header",
          placement: "right"
        },
        {
          title: "My content",
          content: "Here is where I put my content.",
          target: document.querySelector("#content p"),
          placement: "bottom"
        }
      ]
    };

    // Start the tour!
    hopscotch.startTour(tour);
        

That’s all there is to it!

Defining a Tour

A Hopscotch tour consists of a tour id, an array of tour steps defined as JSON objects, and a number of tour-specific options. The tour id is simply a unique identifier string. The simplest tour consists of just an id string and an array of one or more steps.

Basic step options

The step options below are the most basic options.

Note that title and content are both optional only because you can choose to have a step with only a title, only content, or both title and content.

This is an example of a tour defined with only basic steps.


    {
      id: "welcome_tour",
      steps: [
        {
          target: "header",
          placement: "bottom",
          title: "This is the navigation menu",
          content: "Use the links here to get around on our site!"
        },
        {
          target: "profile-pic",
          placement: "right",
          title: "Your profile picture",
          content: "Upload a profile picture here."
        },
        {
          target: "inbox",
          placement: "bottom",
          title: "Your inbox",
          content: "Messages from other users will appear here."
        }
      ]
    }
        

IMPORTANT — title and content are set using element.innerHTML. This allows the inclusion of very basic markup like links and lists. However, it also allows the inclusion of malicious script injections when used improperly. It is highly recommended to never show user-generated content in a Hopscotch tour. If it is absolutely necessary, you must properly escape the input, as always.

All step options

The comprehensive list of step options are listed below:

Mandatory

  • target [STRING/ELEMENT/ARRAY] – id of the target DOM element or DOM element itself. It is also possible to define an array of several targets. If an array is provided, Hopscotch will use the first target that exists on the page and disregard the rest.
  • placement [STRING] – specifies where the bubble should appear in relation to the target. Valid values are “top”, “bottom”, “right”, “left”.

Optional

  • title [STRING] – step title
  • content [STRING] – step content
  • width [INT] – bubble width
  • padding [INT] – bubble padding
  • xOffset [INT] – horizontal position adjustment for bubble. Value can be number of pixels or “center”. Default: 0.
  • yOffset [INT] – vertical position adjustment for bubble. Value can be number of pixels or “center”. Default: 0.
  • arrowOffset [INT] – offset for the bubble arrow. Value can be number of pixels or “center”. Default: 0.
  • delay [INT] – number in milliseconds to wait before showing step. Default: 0.
  • zindex [INT] – sets the z-index of the bubble
  • showNextButton [BOOLEAN] – should show the next button. Default: true.
  • showPrevButton [BOOLEAN] – should show the prev button. Default: true.
  • showCTAButton [BOOLEAN] – should show the call-to-action button. Default: false.
  • ctaLabel [STRING] – label for the call-to-action button.
  • multipage [BOOLEAN] – indicates that the next step is on a different page. Default: false.
  • showSkip [BOOLEAN] – if true, ‘Next’ button reads ‘Skip’. Default: false.
  • fixedElement [BOOLEAN] – set to true if the target element has fixed positioning. Default: false.
  • nextOnTargetClick [BOOLEAN] – triggers nextStep() when the target is clicked. Default: false.
  • onPrev [FUNCTION] – callback for when ‘Previous’ button is clicked
  • onNext [FUNCTION] – callback for when ‘Next’ button is clicked
  • onShow [FUNCTION] – callback for when step is first displayed
  • onCTA [FUNCTION] – callback for the optional call-to-action button

Setting tour options

Tour options can be specified either through the tour JSON object, or through a call to hopscotch.configure(). These options apply to the entire tour. In cases where there is both a value specified in the tour options and in a step definition, (e.g. “showPrevButton”) the step definition takes priority. When multiple callbacks are defined in both step and tour options, step callbacks are invoked before tour-wide callbacks.

  • id [STRING] – Mandatory A unique identifier string for your tour. Used for keeping state.
  • bubbleWidth [NUMBER] – Default bubble width. Default: 280.
  • bubblePadding [NUMBER] – Default bubble padding. Default: 15.
  • smoothScroll [BOOLEAN] – Should the page scroll smoothly to the next step? Default: true.
  • scrollDuration [NUMBER] – Duration of page scroll in milliseconds. Only relevant when smoothScroll is set to true. Default: 1000.
  • scrollTopMargin [NUMBER] – When the page scrolls, how much space should there be between the bubble/targetElement and the top of the viewport? Default: 200.
  • showCloseButton [BOOLEAN] – Should the tour bubble show a close (X) button? Default: true.
  • showPrevButton [BOOLEAN] – Should the bubble have the Previous button? Default: false.
  • showNextButton [BOOLEAN] – Should the bubble have the Next button? Default: true.
  • arrowWidth [NUMBER] – Default arrow width. (space between the bubble and the targetEl) Used for bubble position calculation. This option is provided for the case where the developer wants to use custom CSS to adjust the size of the arrow. Default: 20.
  • skipIfNoElement [BOOLEAN] – If a specified target element is not found, should we skip to the next step? Default: true.
  • nextOnTargetClick [BOOLEAN] – Should we advance to the next step when the user clicks on the target? Default: false.
  • onNext [FUNCTION] – Invoked after every click on a “Next” button.
  • onPrev [FUNCTION] – Invoked after every click on a “Prev” button.
  • onStart [FUNCTION] – Invoked when the tour is started.
  • onEnd [FUNCTION] – Invoked when the tour ends.
  • onClose [FUNCTION] – Invoked when the user closes the tour before finishing.
  • onError [FUNCTION] – Invoked when the specified target element doesn’t exist on the page.
  • i18n [OBJECT] – For i18n purposes. Allows you to change the text of button labels and step numbers.
  • i18n.nextBtn [STRING] – Label for next button
  • i18n.prevBtn [STRING] – Label for prev button
  • i18n.doneBtn [STRING] – Label for done button
  • i18n.skipBtn [STRING] – Label for skip button
  • i18n.closeTooltip [STRING] – Text for close button tooltip
  • i18n.stepNums [ARRAY] – Provide a list of strings to be shown as the step number, based on index of array. Unicode characters are supported. (e.g., [‘一’, ‘二’, ‘三’]) If there are more steps than provided numbers, Arabic numerals (‘4’, ‘5’, ‘6’, etc.) will be used as default.

API Methods

The Hopscotch framework comes with a simple set of API calls with which you can run and manage tours:

  • hopscotch.startTour(tour, stepNum) – Actually starts the tour. Optional stepNum argument specifies what step to start at.
  • hopscotch.showStep(idx) – Skips to a given step in the tour
  • hopscotch.prevStep() – Goes back one step in the tour
  • hopscotch.nextStep() – Goes forward one step in the tour
  • hopscotch.endTour([clearCookie]) – Ends the current tour. If clearCookie is set to false, the tour state is preserved. Otherwise, if clearCookie is set to true or is not provided, the tour state is cleared.
  • hopscotch.configure(options) – Sets options for running the tour. See above section “Setting tour options” for a list of configuration options.
  • hopscotch.getCurrTour() – Returns the currently running tour.
  • hopscotch.getCurrStepNum() – Returns the current zero-based step number.
  • hopscotch.getState() – Checks for tour state saved in sessionStorage/cookies and returns the state if it exists. Use this method to determine whether or not you should resume a tour.
  • hopscotch.listen(eventName, callback) – Adds a callback for one of the event types. Valid event types are: *start*, *end*, *next*, *prev*, *show*, *close*, *error*
  • hopscotch.unlisten(eventName, callback) – Removes a callback for one of the event types.
  • hopscotch.removeCallbacks([eventName[, tourOnly]]) – Remove callbacks for hopscotch events. If tourOnly is set to true, only removes callbacks specified by a tour (callbacks set by hopscotch.configure or hopscotch.listen will remain). If eventName is null or undefined, callbacks for all events will be removed.
  • hopscotch.registerHelper(id, fn) – Registers a callback helper. See the section about Helpers below.
  • hopscotch.resetDefaultI18N() – Resets i18n strings to original default values.
  • hopscotch.resetDefaultOptions() – Resets all config options to original values.

Defining callbacks

Hopscotch has several events to which you can assign callbacks. These events include start, end, next, prev, show, close, error. For the next, prev, and show events, you can assign callbacks within step definitions as well as in the tour itself.

There are two ways to define event callbacks:

Function literals

If you are specifying your tour as an object literal in Javascript, you can provide a function literal as the value of your callback. This would look like the following:


    var tour = {
      id: 'myTour',
      steps: [
        {
          target: 'firststep',
          placement: 'bottom',
          title: 'My First Step',
          onNext: function() {
            $('#firststep').hide();
          }
        }
      ],
      onStart: function() {
        $('#article').addClass('selected');
      }
    };
        

Callback Helpers

In some situations, you may want to specify your tour in JSON. This may be because you are dynamically creating a tour on the server. Since functions are not valid JSON, specifying a function literal will not work. Instead, you can use Hopscotch helpers to specify your callback. Using helpers will look something like the following.

First register the helper with Hopscotch.


    hopscotch.registerHelper('selectArticle', function() {
      $('#article').addClass('selected');
    });
        

An example with an argument passed in:


    hopscotch.registerHelper('fillText', function(textFieldId, textStr) {
      document.getElementById(textFieldId).value = textStr;
    });
        

Then, when you define your tour, you specify the callback as an array of the following form: [helperId, arg, arg, ...]. For example:


    {
      id: "myTour",
      steps: [
        {
          target: "firststep",
          placement: "bottom",
          title: "My First Step",
          onNext: ["fillText", "searchField", "Example search query"]
        }
      ],
      onStart: ["selectArticle"]
    }
        

In the above example, since the onStart callback has no arguments, it could be defined as a simple string “selectArticle” instead of being wrapped in a one-element array.

To specify several helpers for a certain event:


    {
      id: "myTour",
      steps: [
        ...
      ],
      onStart: [["fillText", "searchField", "Example search query"], "selectArticle"]
    }
        

Callbacks will be invoked in the order that they are specified.

To remove a helper, simply call hopscotch.unregisterHelper('myHelperId').

Internationalization

Hopscotch supports internationalization via i18n object in tour config. The default language is English. If you need a tour in a language other than English, pass in translated text in your tour config. Text used for previous, next, skip, done and close buttons, as well as, tour step numbers can be translated.

Here is an example of tour config in Russian:


    {
      id: "myTour",
      i18n: {
        nextBtn: "Далее",
        prevBtn: "Назад",
        doneBtn: "Готово",
        skipBtn: "Пропустить",
        closeTooltip: "Закрыть",
        stepNums : ["1", "2", "3"]
      },
      steps: [
        ...
      ]
    }
        

Tour Example


    {
      id: "hello-hopscotch",
      steps: [
        {
          target: "hopscotch-title",
          title: "Welcome to Hopscotch!",
          content: "Hey there! This is an example Hopscotch tour. There will be plenty of time to read documentation and sample code, but let's just take some time to see how Hopscotch actually works.",
          placement: "bottom",
          xOffset: 'center',
          arrowOffset: 'center'
        },
        {
          target: document.querySelectorAll("#general-use-desc code")[1],
          title: "Where to begin",
          content: "At the very least, you'll need to include these two files in your project to get started.",
          placement: "right",
          yOffset: -20
        },
        {
          target: "my-first-tour-file",
          placement: "top",
          title: "Define and start your tour",
          content: "Once you have Hopscotch on your page, you're ready to start making your tour! The biggest part of your tour definition will probably be the tour steps."
        },
        {
          target: "start-tour",
          placement: "right",
          title: "Starting your tour",
          content: "After you've created your tour, pass it in to the startTour() method to start it.",
          yOffset: -25
        },
        {
          target: "basic-options",
          placement: "left",
          title: "Basic step options",
          content: "These are the most basic step options: <b>target</b>, <b>placement</b>, <b>title</b>, and <b>content</b>. For some steps, they may be all you need.",
          arrowOffset: 100,
          yOffset: -80
        },
        {
          target: "api-methods",
          placement: "top",
          title: "Hopscotch API methods",
          content: "Control your tour programmatically using these methods.",
        },
        {
          target: "demo-tour",
          placement: "top",
          title: "This tour's code",
          content: "This is the JSON for the current tour! Pretty simple, right?",
        },
        {
          target: "hopscotch-title",
          placement: "bottom",
          title: "You're all set!",
          content: "Now go and build some great tours!",
          xOffset: 'center',
          arrowOffset: 'center'
        }
      ],
      showPrevButton: true,
      scrollTopMargin: 100
    }
        

Multipage Tour Example

To see a multipage tour example, see the multipage tour demo.

Hopscotch Callouts

Sometimes all you need is a simple callout. You can use Hopscotch Callouts to achieve this.


    var calloutMgr = hopscotch.getCalloutManager();
    calloutMgr.createCallout({
      id: 'attach-icon',
      target: 'attach-btn',
      placement: 'bottom',
      title: 'Now you can share images &amp; files!',
      content: 'Share a project you\'re proud of, a photo from a recent event, or an interesting presentation.'
    });
        

Callouts come with the same options available as tour steps, so you can specify things like width, placement, offsets, and z-index. The most important difference between tour steps and callouts is that you must supply an id when creating a callout for later reference.

All management of callouts is done through the Hopscotch Callout Manager. The Callout Manager’s job is pretty simple and comes with only a handful of API methods.

  • calloutMgr.createCallout(options) – Creates callout referenced by an id. Options are the same as tour step options, where applicable.
  • calloutMgr.getCallout(id) – Returns the callout object for the given id.
  • calloutMgr.removeCallout(id) – Removes the callout for the given id from the page.
  • calloutMgr.removeAllCallouts() – Removes all registered callouts from the page.

 

Website: http://linkedin.github.io/hopscotch/

DEMO: http://linkedin.github.io/hopscotch/multipage1.html


Thanks for reading,
SABIT SOLUTIONS

 

Turn checkboxes and radio buttons in toggle switches – Bootstrap switch

Turn checkboxes and radio buttons in toggle switches – Bootstrap switch

Turn checkboxes and radio buttons in toggle switches.

 

Demo and Documentation

Getting started

Include the dependencies: jQuery, Bootstrap and Bootstrap Switch CSS + Javascript:

[...]
<link href="bootstrap.css" rel="stylesheet">
<link href="bootstrap-switch.css" rel="stylesheet">
<script src="jquery.js"></script>
<script src="bootstrap-switch.js"></script>
[...]

Add your checkbox:

<input type="checkbox" name="my-checkbox" checked>

Initialize Bootstrap Switch on it:

$("[name='my-checkbox']").bootstrapSwitch();

Enjoy.

Less

If you want to use your bootstrap variables, include bootstrap-switch.less in your compilation stack. You can even choose among Bootstrap versions 2.3.2 or 3.. compatible source.

AngularJs

Two custom directives are available:

KnockoutJs

A Knockout binding handler is available here

NuGet

A NuGet package is available here

Supported browsers

IE9+ and all the other modern browsers.

License

Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0

We are in the process of changing from Apache to MIT. If you contributed before February 5th, 2015, please add your vote here to accept license change: https://github.com/nostalgiaz/bootstrap-switch/issues/347


Source: https://github.com/nostalgiaz/bootstrap-switch

Website: http://www.bootstrap-switch.org/


 
Thanks,
SABIT SOLUTIONS

 

 

Convert Checkboxes into Toggle Buttons with simple Bootstrap based library reference.

Convert Checkboxes into Toggle Buttons with simple Bootstrap based library reference.

Bootstrap Toggle is a highly flexible Bootstrap plugin that converts checkboxes into toggles or toggle buttons.

 

Getting Started


Installation

You can download the latest version of Bootstrap Toggle or use CDN to load the library.

Warning If you are using Bootstrap v2.3.2, use bootstrap2-toggle.min.js and bootstrap2-toggle.min.css instead.

<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.0/css/bootstrap-toggle.min.css" rel="stylesheet"> <script src="https://gitcdn.github.io/bootstrap-toggle/2.2.0/js/bootstrap-toggle.min.js"></script>

Bower Install

bower install bootstrap-toggle

Usage


Basic example

Simply add data-toggle="toggle" to convert checkboxes into toggles.

 

<input type="checkbox" checked data-toggle="toggle">

Bootstrap_toggle

 

<div class=“checkbox”> <label> <input type=“checkbox” data-toggle=“toggle”> Option one is enabled </label> </div> <div class=“checkbox disabled”> <label> <input disabled type=“checkbox” data-toggle=“toggle”> Option two is disabled </label> </div>

 


 

Website: http://www.bootstraptoggle.com/

Demos: http://www.bootstraptoggle.com/#demos

Download: https://github.com/minhur/bootstrap-toggle/archive/master.zip

 


 

 

Thanks,
SABIT SOLUTIONS