Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
51
rated 0 times [  58] [ 7]  / answers: 1 / hits: 15884  / 9 Years ago, fri, july 3, 2015, 12:00:00

I know this question has been asked probably too many times before but none of those solutions has been able to help me out.I keep getting the above error even if I have everything in place AFAIK.



I have included the button in the html code but when i try to find them through jquery error: Cannot read property 'ready' of null occurs moreover it does not even recognize the document.ready function. Here is my full code:



<!DOCTYPE html>

<html xmlns=http://www.w3.org/1999/xhtml>
<head>
<title></title>
<script src=Scripts/jquery.js></script>
<script src=Scripts/jsencrypt.js></script>
<script src=Scripts/jsencrypt.min.js></script>
<script src=Scripts/jsencrypt.min.js></script>
<script src=Scripts/jsencrypt.js></script>
<script type=text/javascript src=System.js></script>
<script type=text/javascript src=System.IO.js></script>
<script type=text/javascript src=System.BigInt.js></script>
<script type=text/javascript src=System.BitConverter.js></script>
<script type=text/javascript src=System.Convert.js></script>
<script type=text/javascript src=System.Security.Cryptography.HMACSHA1.js></script>
<script type=text/javascript src=System.Security.Cryptography.js></script>
<script type=text/javascript src=System.Security.Cryptography.RSA.js></script>
<script type=text/javascript src=System.Security.Cryptography.SHA1.js></script>
<script type=text/javascript src=System.Text.js></script>

<script type=text/javascript>
$(document).ready(function () {
alert(button);

});
// debugger;
// var element = document.getElementById(btntest);

//$(#btntest).click(function () {
// alert(button);
//});

</script>

</head>
<body>
<input type=button id=btntest value=Test />


<span>Name:</span>
<input type=text id=txtName />
<br />
<br />

<input type=button id=btnSend value=Send />




</body>
</html>


Any suggestions to resolve this would be really appreciated.


More From » jquery

 Answers
80

Have you tried using a CDN for example -
https://code.jquery.com/jquery-1.11.3.min.js



I don't see any problem with the code as long as $ has been overwritten by any other reference below it. If the code does not work with CDN reference, you can also try adding the jquery reference at the end.


[#65943] Wednesday, July 1, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
taylert

Total Points: 627
Total Questions: 91
Total Answers: 108

Location: Mayotte
Member since Mon, Sep 12, 2022
2 Years ago
taylert questions
;