<?php
$scripts = array();
/* add script */
$script = <<<JS
$(function () {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' // optional
});
});
JS;
array_push($scripts, $script);
/* add script */
$script = <<<JS
$(function () {
$("#updateAccount").html('<i class="fa fa-refresh margin-r-5 fa-spin"></i> Updating');
});
JS;
array_push($scripts, $script);
/* function */
function scripts() {
global $scripts;
if (isset($scripts[0])) {
echo "\n".'<script type="text/javascript">';
foreach ($scripts as $script) {
echo "\n".$script;
}
echo "\n".'</script>'."\n";
}
}
/* using */
scripts();