Skip to content

Instantly share code, notes, and snippets.

@lupo112
Created August 9, 2016 06:19
Show Gist options
  • Select an option

  • Save lupo112/54c7e0a30421192f29828a65d8dd0e20 to your computer and use it in GitHub Desktop.

Select an option

Save lupo112/54c7e0a30421192f29828a65d8dd0e20 to your computer and use it in GitHub Desktop.
$(function() {
$.nette.init();
var $content = $('section.content');
/**
* @param $ctx
*/
var redrawSometring = function ($ctx) {
// code
};
$content.on('click', '.btn', redrawSometring);
redrawSometring($content);
/**
* Initialize all checkbox and radio inputs to iCheck plugin in.
* You can find the documentation at http://fronteed.com/iCheck/
* @param $ctx
*/
var initICheck = function($ctx) {
$ctx.find("input[type='checkbox']:not(.simple), input[type='radio']:not(.simple)").iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%'
});
};
$.nette.ext('snippets').after(initICheck);
initICheck($('body'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment