By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,719 Members | 1,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,719 IT Pros & Developers. It's quick & easy.

How to show mp4 videos in popup window using the fancybox plugin?

P: 38
how to show the mp4 videos in popup window using the fancy box plugin ..

here it is my code
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" src="jquery.js"></script>
  2.     <script type="text/javascript" src="jquery.fancybox-1.3.4.js"></script>
  3. <script type="text/javascript">
  4. $(document).ready(function () {
  5.     $("a.fancyvideo5").click(function () {
  6.         var url = $(this).attr('name');
  7.         $.fancybox({
  8.             'padding': 7,
  9.             'overlayOpacity': 0.7,
  10.             'autoDimensions': false,
  11.  
  12.             'content': '<div class="video-js-box">' +
  13.                         '<video class="video-js" width="635" height="475" controls preload>' +
  14.                        '<source src="' + url + '"' + 'type=video/mp4; codecs="avc1.42E01E, mp4a.40.2"' + '/> ' +
  15.                         '</video>' +
  16.                         '</div>',
  17.  
  18.  
  19.         });
  20.     }); 
  21.  
  22.  
  23. });
  24.  
  25. </script>
  26.  
  27.  
  28. <! -- -->
  29.  
  30. <a class="fancyvideo5" name="test.mp4"><img src="tt2.jpg" width="248" height="145" alt="Film" /></a>
Apr 16 '12 #1
Share this Question
Share on Google+
1 Reply


Dormilich
Expert Mod 5K+
P: 8,639
are there messages in the Error Console?

line 14 also looks suspicious (invalid/missing characters)
Apr 16 '12 #2

Post your reply

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