$(function() { var isCustomerNominated = $("#IsCustomerNominated"); hideAirline.call(isCustomerNominated); isCustomerNominated.on("change", function (e) { hideAirline.call($(this)); }) }); function hideAirline() { var contractedAirline = $("#contractedAirline"); if (this.is(":checked")) { contractedAirline.css("visibility", "visible"); } else { contractedAirline.css("visibility", "hidden"); } }

Comments

Popular posts from this blog

CREATE DATABASE (SMO)

Enable JSON serialization in your Visual Studio 2010 project

jQuery | remove inline style