fix bootstrap affix flickering

When you work with the bootstrap 3 affix plugin, sometimes you experience some flicker. The plugin switches rapidly the .affix .affix-top or .affix-bottom classes. This comes from setting your DOM-Element to e.g. position: static; One solution is to use a custom function for offsets and return different values for affix Read more…

parsley js: bootstrap validation

Parsley is a javascript form validation library. This snippets configures parsley for bootstrap input elements. var parsleyInstance = $(‘#checkout’).parsley({ errorClass: ‘has-error’, successClass: ‘has-success’, errorsWrapper: ‘<div></div>’, errorTemplate: ‘<span class=”help-block”></span>’, classHandler: function (ParsleyField) { return ParsleyField.$element.parent(); } }); parsley options reference: http://parsleyjs.org/doc/annotated-source/defaults.html

Twitter Bootstrap – basic template + CDN

<!DOCTYPE html> <html lang=”de”> <head> <meta charset=”utf-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <!– The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags –> <title>Bootstrap 101 Template</title> <!– Bootstrap –> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css”> <!– HTML5 shim and Respond.js Read more…

more semantic html with less and bootstrap

Classic Bootstrap: <div class=”container”> <div class=”row”> <div class=”col-xs-12 col-sm-6 col-md-4 col-lg-2″>my grid item</div> <div class=”col-xs-12 col-sm-6 col-md-4 col-lg-2″>my grid item</div> <div class=”col-xs-12 col-sm-6 col-md-4 col-lg-2″>my grid item</div> <div class=”col-xs-12 col-sm-6 col-md-4 col-lg-2″>my grid item</div> </div> </div> More semantic version: // import all bootstrap less files first @import “less/bootstrap”; // build Read more…