javascript - jQuery of multiple elements not executing, although works on concept -
on concept design jquery controlling things calendar appear when input(s) @ top right clicked on work fine, i'm trying integrate existing design, these javascript elements not working, although using same code amongst other things existed within old design.
i considered compatibility issue of sidebar calendar, removed entirely , still nothing. within console defines "cannot read property 'datetimepicker' of null" example.
live url of concept (all working elements): http://bit.ly/1m23oxt live url of non working site: http://bit.ly/1gxgxfx
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <link rel="stylesheet" type="text/css" href="<?php echo http_host; ?>styles/jquery.datetimepicker.css" /> <script src="<?php echo http_host; ?>scripts/jquery.idtabs.min.js"></script>
.
<div class="header-reservations"> <div id="usual2" class="usual"> <ul> <li><a href="#tabs2" class="selected">room bookings</a></li> <li><a href="#tabs3">spa bookings</a></li> </ul> <div id="tabs2"> <form> <input type="text" class="header-form-input" id="datetimepicker" placeholder="21st january" /> <select class="header-form-dropdown"> <option>1 night</option> <option>2 nights</option> </select> <select class="header-form-dropdown"> <option>1 adult</option> <option>2 adults</option> </select> <input type="submit" class="header-form-submit blue-btns" value="book" /> </form> <span class="clearboth"></span> </div> <div id="tabs3"> <div class="header-tab-spa"> <h3>to make spa booking, contact <a href="#">here</a></h3> </div> <span class="clearboth"></span> </div> </div> </div>
.
<!-- required js files --> <script type="text/javascript"> $(document).ready(function() { $("#usual2 ul").idtabs("tabs2"); } </script> <script src="<?php echo http_host; ?>scripts/jquery.datetimepicker.js"></script> <script type="text/javascript"> $('#datetimepicker').datetimepicker(); $('#datetimepicker2').datetimepicker(); </script>
a parenthesis missing @ end of
$(document).ready(function() { $("#usual2 ul").idtabs("tabs2"); }
but such syntax error should found using console, not stack overflow. read about console.
Comments
Post a Comment