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

c# - Unity IoC Lifetime per HttpRequest for UserStore -

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

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -