hi I use below code to make enabled true or false for textbox when checkbox checked:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$("#Ch1").click(function () {
if ($(this).is(":checked")) {
$("#Txtmatn").removeAttr("disabled");
$("#Txtmatn").focus();
} else {
$("#Txtmatn").attr("disabled", "disabled");
}
});
});
</script>
And use below code to change check box appearance:
<script src="../scripts/jquery.js"></script>
<script src="../scripts/icheck.js"></script>
<link href="../skins/square/red.css" rel="stylesheet" />
<script type="text/javascript">
window.onload = function () {
ApplyCss();
};
function ApplyCss() {
$('input').iCheck({
checkboxClass: 'icheckbox_square-red',
radioClass: 'iradio_square-red',
increaseArea: '20%' // optional
});
};
//On PostBack
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
ApplyCss();
}
});
};
</script>
but problem is that when I add first code to make textbox enabled true...
it doesn't effect jquery code for checkbox appearance and show checkbox in default in asp.net
I should remove below code untill jquey effect for checkbox worked correctly:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
but I need above code for first jquery codes
Best regards
neda