php - Load jQuery into <body> -


my structure following:

<html>   <head>   </head>   <body>     <?php include('form.php')?>     <script src='jquery.js'>   </body> </html> 

my php include not executes jquery functions...

i put jquery functions in form.php a:

$(document).ready(function() {     $('.newbooking').click(function() {         alert($(this).attr("data-date"));        }); }); 

but nothing...

is normal ?

try with:

<script src='jquery.js'> <?php include('form.php')?> 

your code doesn't work because try use jquery before loaded. use $(document).ready call jquery function. use it...


Comments

Popular posts from this blog

What can cause "Required Package 'IndyCore' not found" when compiling a Delphi 2010 project? -

Change the color of an oval at click in Java AWT -