what’s wrong with this code ? i am a beginner
<link type="text/css" href="/css/custom-theme/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript" src="/js/jquery.expander.js"></script>
<script type="text/javascript" src="/js/jquery.expander.min.js"></script>
<script type="text/javascript" src="/js/fancybox/jquery.fancybox-1.3.4.js"></script>
<script type="text/javascript" src="/js/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="/js/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
here a call fancybox
$("a#select_button").fancybox();
and here is my html code
<p class="resp"><img src="logos/S7.png"><br>
<b>Title</b>
<span class="fprice">264 EUR</span>
<a id="select_button" href="book_air.php?type=typeval&origin=Val"><input class="selectt" value="Select" type="button"></a>
<span class="f_row">
<input name="first_row" type="radio">val-10:40 - val 11:40</span><br>
<span class="s_row">
<input name="second_row" type="radio">val-17:55 - val 21:10
</span>
<span class="buts"><input class="f_det" value="Details" type="button"> <input class="f_det" value="Share" type="button"></span>
</p>
i dont know where is my problem, could anybody help me please ?
You have to make sure that the script runs when the DOM is ready. There’s two ways that you can accomplish this.
Either you wait for the document.ready event to be called from jQuery. To do that you would add this to your script:
or you would have to include the script last in your html-document (inside the body-tag).
(The script in this case refers to the line with the call to fancybox)