Advertisement
pixedelic

script to replace video bg with an image

Sep 26th, 2011
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.63 KB | None | 0 0
  1. <script>
  2. jQuery(function(){
  3.     if( navigator.userAgent.match(/Android/i) ||
  4.         navigator.userAgent.match(/webOS/i) ||
  5.         navigator.userAgent.match(/iPad/i) ||
  6.         navigator.userAgent.match(/iPhone/i) ||
  7.         navigator.userAgent.match(/iPod/i)){
  8.             jQuery('video').remove();
  9.             jQuery('.pix_overlay_pattern').before(
  10.                 '<div class="pix_slide" data-position="fixed" data-top="0" data-bottom="not">'+
  11.                 '<div data-src="THE_COMPLETE_URL_OF_YOUR_BACKGROUND_IMAGE"></div>'+
  12.                 '</div>'+
  13.                 '<div id="pixwall_target" data-position="fixed" data-top="0" data-bottom="not"></div>'
  14.             );
  15.             jQuery('.pix_slide').pixwall();
  16.         }
  17. });
  18. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement