0

I have included jquery in javascript but it is not working wt to do i hv also included jquery in it

<script type="text/javascript" src="/home/aman/html/book_cricket.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11./jquery.min.js"></script>
0

2 Answers 2

2

jQuery should run at the beginning

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11./jquery.min.js"></script>
<script type="text/javascript" src="/home/aman/html/book_cricket.js"></script>

Sign up to request clarification or add additional context in comments.

2 Comments

what is the problem if javascript is above jquery
if you do not run at the beginning, jQuery can't detect its related code from book_cricket.js
2

The browser reads the javascript files in the order you place them. Try reversing them to

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11./jquery.min.js"></script>
<script type="text/javascript" src="/home/aman/html/book_cricket.js"></script>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.