runlevelsix / meteor-bootstrap-3-switch

Bootstrap3 switch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bootstrap 3 Switch - Meteor Smart Package

This is a the bootstrap switch jquery plugin as a meteor smart package, specifically for use with bootstrap3

It is basically Tim Heckels meteor-bootstrap-switch but packages with the bootstrap3 files

##How to use?

###Install

meteor add jt6562:bootstrap-3-switch

###HTML

<input type="checkbox" name="switch">

###Convert input tag to switch

    $("[name='switch']").bootstrapSwitch({size: "small"});

###Event

    $("[name='switch']").on('switchChange.bootstrapSwitch', function (event, data) {
        var status = data === true ? 'on' : 'off';

        Meteor.call('toggle', status);
    }); 

About

Bootstrap3 switch


Languages

Language:JavaScript 100.0%