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
Post a Comment