Call function on page load and onchange
I want this function to check the state of the checkbox on load as well as onchnage but it doesn't work, what am I doing wrong please?:
$(function (SFToggle) {
$('#short_format').change(function () {
if ($('#short_format').is(':checked')) {
$(".no-short-format").hide();
}else{
$('.no-short-format').show();
}
});
});
$(document).ready( function () {
SFToggle();
});