Bootstrap 3 Template
This is a simple Twitter Bootstrap 3 template. You can fork it to get a ready to use Bootstrap 3 fiddle.
HTML
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<div id="formValidate" class="bv-form" novalidate="novalidate">
<div class="action-method-container" style="margin-top:15px;">
<input type="radio" name="activation-method" id="sms-mail"><span class="strong">SMS Message</span>
<div style="margin-left:20px;margin-bottom:30px;margin-top:5px;">
<!--<p>301-482-8258</p>-->
<div class="form-group has-feedback has-feedback-right row">
<div class="edit-row-container col-sm-6">
<div class="edit-elements">
<input type="text" class="form-control store" pattern="\d*" name="phoneNumber" readonly required data-by-field="phoneNumber" id="phone-input-edit" />
<img src="img/icons/lock_gray.svg" onerror="this.src='img/icons/lock_gray.png'; this.onerror=null;" class="form-control-icon-right form-control-feedback" alt="" />
<div class="edit">
<img src="img/icons/pencil_gray.svg" onerror="this.src='img/icons/pencil_gray.png'; this.onerror=null;" class="field-icon-left" alt="" />
<input name="Edit" type="button" value="Edit" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
CSS
/* Latest compiled and minified CSS included as External Resource*/
/* Optional theme */
@import url('//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css');
body {
margin: 10px;
}
JavaScript
/*!
* v0.1.4
* Copyright (c) 2014 First Opinion
* formatter.js is open sourced under the MIT license.
*
* thanks to digitalBush/jquery.maskedinput for some of the trickier
* keycode handling
*/
//
// Uses Node, AMD or browser globals to create a module. This example creates
// a global even when AMD is used. This is useful if you have some scripts
// that are loaded by an AMD loader, but they still want access to globals.
// If you do not need to export a global for the AMD case,
// see returnExports.js.
//
// If you want something that will work in other stricter CommonJS environments,
// or if you need to create a circular dependency, see commonJsStrictGlobal.js
//
// Defines a module "returnExportsGlobal" that depends another module called
// "b". Note that the name of the module is implied by the file name. It is
// best if the file name and the exported global have matching names.
//
// If the 'b' module also uses this type of boilerplate, then
// in the browser, it will create a global .b that is used below.
//
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], function () {
return (root.returnExportsGlobal = factory());
});
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports,
// like Node.
module.exports = factory();
} else {
root['Formatter'] = factory();
}
}(this, function () {
/*
* pattern.js
*
* Utilities to parse str pattern and return info
*
*/
var pattern = function () {
// Define module
var pattern = {};
// Match information
var DELIM_SIZE = 4;
// Our regex used to parse
var regexp = new RegExp('{{([^}]+)}}', 'g');
//
// Helper method to parse pattern str
//
var getMatches = function (pattern) {
// Populate array of matches
var matches = [], match;
...