Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
48
rated 0 times [  54] [ 6]  / answers: 1 / hits: 86051  / 15 Years ago, sun, december 6, 2009, 12:00:00

In a php file i have used include to include the following js.php file
and prior to that i have included the jquery file.



<script type=text/javascript>

$(document).ready(function(){
alert(hello);
});
</script>


But it doesn't work. Why? when I skip the $(document).ready function it works.



But i need jquery code inside. what is wrong?


More From » php

 Answers
7

The most likely answer, based on what you have said, is that the core jQuery file is not actually included correctly in the page.
You need something like:



<script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js></script>


Chances are, this is missing or typed incorrectly.


[#98135] Thursday, December 3, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lamontm

Total Points: 482
Total Questions: 99
Total Answers: 91

Location: Burkina Faso
Member since Thu, Dec 15, 2022
1 Year ago
;