mardi 2 décembre 2014

Document.ready is not working but other jquery code is working?


Vote count:

0




I am getting exception in document.ready as $ is undefined, Why? if I removed document .ready function other jquery code working fine . following is my code



<script type="text/javascript">
$(document).ready(function () { alert('Hi'); });
function LoginTypeChanged() {
if ($('#loginType option:selected').val() === "1") {
$("#txtUserName").prop('disabled', false);
$("#txtPassword").prop('disabled', false);
$("#txtDomain").prop('disabled', false);
}
else if ($('#loginType option:selected').val() === "0") {
$("#txtUserName").val("");
$("#txtPassword").val("");
$("#txtDomain").val("");
$("#txtUserName").prop('disabled', true);
$("#txtPassword").prop('disabled', true);
$("#txtDomain").prop('disabled', true);

}
}
</script>


asked 39 secs ago







Document.ready is not working but other jquery code is working?

Aucun commentaire:

Enregistrer un commentaire