471,853 Members | 1,704 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,853 software developers and data experts.

jquery file include problem

638 512MB
hi there i am trying to run the lightbox and a slider on a single page the light box is working allrigh but when i try to include the slider in the same page it generates error because i have to include the jquery.js file to run it .i think it is a problem with the order of the file include. the error which i receive is here
and on the prototype.js which is included for the lightbox i am stucked please any one here
element.dispatchEvent is not a function
[Break on this error] element.dispatchEvent(event);
my code is here
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3.     <head>
  4.         <meta http-equiv="Content-Type" content="text/html; charset=<?=CHARSET;?>" />
  5.         <title><?=SITE_TITLE;?></title>
  6.         <style type="text/css">
  7.             img, table, tr, td { behavior: url(iepngfix.htc) }
  8.         </style>
  9.         <link type="text/css" rel="stylesheet" href="includes/styles.css" />
  10.         <link type="text/css" rel="stylesheet" href="includes/lightbox.css" media="screen" />
  11.         <script type="text/javascript" src="includes/methods.js"></script>
  12.         <script type="text/javascript" src="includes/prototype.js"></script>
  13.         <script type="text/javascript" src="includes/scriptaculous.js?load=effects,builder"></script>
  14.         <script type="text/javascript" src="includes/lightbox.js"></script>
  15. <script type="text/javascript" src="includes/jquery.js"></script>
  16.         <script type="text/javascript">
  17.             $(function(){
  18.             $("#mostrar").click(function(event) {
  19.             event.preventDefault();
  20.             $("#caja").slideToggle();
  21.             });
  23.             $("#caja a").click(function(event) {
  24.             event.preventDefault();
  25.             $("#caja").slideUp();
  26.             });
  27.             });
  28.         </script>
  29. <body style="background:url(images/img-01.jpg) no-repeat top left; background-attachment:fixed;" onload="MM_preloadImages('images/home-active.gif','images/aboutus-active.gif','images/product-active.gif','images/newarrival-active.gif','images/philosphy-active.gif','images/contactus-active.gif','images/s-1-s.gif','images/s-2-s.gif','images/s-3-s.gif','images/s-4-s.gif','images/s-5-s.gif')">
  30.     <table cellspacing="0" cellpadding="0" border="0" align="center" width="100%">
  31.  <tr class="text-white-11">
  32.                                                                                     <td align="left" width="15"><img src="http://bytes.com/images/arrow-1.gif" width="12" height="5" border="0" alt="" /></td>
  33.                                                                                     <td align="left"><a href="#" id="mostrar">Details</a><div id="caja"><p>Lorem ipsum dolor sit amet,...</p></div></td>
  34.                                                                                 </tr>
  35.  </table>
  36.     </body>
  37. </html>
omer aslam
May 1 '09 #1

✓ answered by omerbutt

hey thanks alot got it fixed

3 5702
16,027 Expert Mod 8TB
See Using jQuery with Other Libraries.

If at all possible, try to avoid using more than one library.
May 1 '09 #2
638 512MB
hey thanks alot got it fixed
May 2 '09 #3
16,027 Expert Mod 8TB
No problem. Glad it's working.
May 2 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

83 posts views Thread by liketofindoutwhy | last post: by
20 posts views Thread by Aaron Gray | last post: by
26 posts views Thread by RobG | last post: by
2 posts views Thread by souporpower | last post: by
53 posts views Thread by souporpower | last post: by
5 posts views Thread by jrod11 | last post: by
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.