A starting point project for modern HTML5 applications.
Extend Object (create), Function (bind), String (trim) and Array (indexOf, lastIndexOf, forEach, map, filter, every and some) for ECMA262-5 compatibility on older browsers.
Example:
$(window).smartresize(function() {
console.log('do something on resize');
});
Example:
kickstart.util.guid();
Example:
var string = 'this is a test',
array = ['this', 'is', 'a', 'test'];
kickstart.util.contains(string, 'is');
kickstart.util.contains(array, 'is');
Example:
var oldObject = {
prop: true
};
var newObject = kickstart.util.clone(oldObject);
Example:
kickstart.util.pluralize(2, 'apple');
Example:
kickstart.util.store('username', 'Juan Carlos');
console.log(kickstart.util.store('username'));
Example:
kickstart.util.getRandomInt(0, 10);
kickstart.util.getRandomArbitary(0, 10);
Author: Thomas Fuchs
Example:
kickstart.system.isRetina();
Author: Addy Osmani
Example:
<script id="myTemplate" type="text/micro">
<div class='username'> {{username}} </div>
<div class="features"> {{features.hair}}, {{features.eyes}}, {{features.height}}</div>
</script>
<script>
var markup = $("#myTemplate").html(),
data = {
username: "addyosmani",
features:{
hair:'black',
eyes: 'brown',
height:'5.8'
}
};
// Log the templated output or populate some an element
// on the page with it
console.log('Test:' + kickstart.template(markup, data));
</script>
Example:
kickstart.preload([
'http://tools.w3clubs.com/pagr2/1.sleep.expires.png',
'http://tools.w3clubs.com/pagr2/1.sleep.expires.js',
'http://tools.w3clubs.com/pagr2/1.sleep.expires.css'
]);