I am using Fronteed's iCheck plugin. This code only works if the radio button changes. But, I also need it to work on page load (I have pulled the value from the database to get the current checked button). Here's my code:
$('input').on('ifChecked', function () {
var number = this.attributes['name'].value.slice(-1);
if ($(this).attr("id") == "icon")
{
$('#box_colour_' + number).show();
$("#text_box_colour_" + number).show();
$('#text_box_' + number).show();
$('#box_icon_' + number).show();
$('#box_link_' + number).show();
$('#box_image_' + number).hide();
$('#box_video_' + number).hide();
}
});
Thanks