Show/Hide DIv Not Working
-
Hello,
When I click on “Book Your Reservation” button I would like to see the content in the DIV below it.
I add this on the page:
<div id="show" class="align-link link">Book Your Reservation</div> <div id="book-form" style="display: none;"> Booking form here... </div>
I add this in functions.php
function wpb_hook_javascript() { ?> <script> $(document).ready(function(){ $('#show').click(function() { $('#book-form').toggle("slide"); }); }); </script> <?php } add_action('wp_head', 'wpb_hook_javascript');
The content is not showing. I’m assuming that the javascript is not working but I’m not sure why.
Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Show/Hide DIv Not Working’ is closed to new replies.