"Login vitrina"
Bootstrap 3.3.0 Snippet by miguelbustamante

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container login"> <div class="row" style="margin-top:20px"> <div class="col-xs-12 col-sm-8 col-md-6 col-sm-offset-2 col-md-offset-3"> <form role="form"> <fieldset> <h2>Ingrese sus credenciales</h2> <hr class="colorgraph"> <div class="form-group"> <input type="email" name="email" id="email" class="form-control input-lg" placeholder="Email Address"> </div> <div class="form-group"> <input type="password" name="password" id="password" class="form-control input-lg" placeholder="Password"> </div> <span class="button-checkbox"> <button type="button" class="btn" data-color="warning">Recordar</button> <input type="checkbox" name="remember_me" id="remember_me" checked="checked" class="hidden"> <a href="" class="btn btn-link pull-right">Recuperar contraseña</a> </span> <hr class="colorgraph"> <div class="row"> <div class="col-xs-6 col-sm-6 col-md-6"> <button class="btn btn-lg btn-default btn-block" >Ingresar</button> </div> <div class="col-xs-6 col-sm-6 col-md-6"> <a href="" class="btn btn-lg btn-default btn-block">Registrarse</a> </div> </div> </fieldset> </form> </div> </div>
/* Credit to bootsnipp.com for the css for the color graph */ .colorgraph { height: 5px; border-top: 0; background: #FF9600; } .login h2{ color: #FFE270; }
$(function(){ $('.button-checkbox').each(function(){ var $widget = $(this), $button = $widget.find('button'), $checkbox = $widget.find('input:checkbox'), color = $button.data('color'), settings = { on: { icon: 'glyphicon glyphicon-check' }, off: { icon: 'glyphicon glyphicon-unchecked' } }; $button.on('click', function () { $checkbox.prop('checked', !$checkbox.is(':checked')); $checkbox.triggerHandler('change'); updateDisplay(); }); $checkbox.on('change', function () { updateDisplay(); }); function updateDisplay() { var isChecked = $checkbox.is(':checked'); // Set the button's state $button.data('state', (isChecked) ? "on" : "off"); // Set the button's icon $button.find('.state-icon') .removeClass() .addClass('state-icon ' + settings[$button.data('state')].icon); // Update the button's color if (isChecked) { $button .removeClass('btn-default') .addClass('btn-' + color + ' active'); } else { $button .removeClass('btn-' + color + ' active') .addClass('btn-default'); } } function init() { updateDisplay(); // Inject the icon if applicable if ($button.find('.state-icon').length == 0) { $button.prepend('<i class="state-icon ' + settings[$button.data('state')].icon + '"></i> '); } } init(); }); });

Related: See More


Questions / Comments: