Adds font functionality to iCheck.js Currently this is written in SASS but will port to SCSS, (Stylus?) and Less in the future.
The things you'll need
- FontForge if you want to extend the font source or build a fresh .woff or .*.
- Illustrator for the .AI file, but there are SVG files for your convenience.
- SASS compiler Grunt, gulp, etc. If you use the sass file.
- Original Fronteed/iCheck.js javascript file its not included in this repo.
Include jquery, the original iCheck javascript and the stylesheet from here. There are options inside the SASS file, but can be totally stripped to the bare minimum with ease.
in the head
<link rel="stylesheet" link="STYLESHEET_PATH/icheck.css">
before the body
<script src="PATH_TO_JQUERY.JS"></script>
<script src="PATH_TO_ICHECK.JS"></script>
//init icheck
<script>
$(document).ready(function() {
return $('input').iCheck({
checkboxClass: 'icheckbox_flat',
radioClass: 'iradio_flat'
});
});
</script>
don't forget to include the font file, it is located in the fonts directory one directory up from the stylesheet directory
As long as the browser supports ::before
in CSS it should all be fine.
Tested in following browsers, both mobile and desktop on windows 10/Android:
- Internet explorer(latest)
- Edge
- Firefox
- Chrome
For contributing, open a new issue. we'll get it sorted.
- fronteed/icheck - Original iCheck.js repo.