Hallo Freunde!
Ich habe per Google ein Script gesucht, welches z.B. YouTube-Videos optimal an jedes Endgerät responsive anpasst.
Da bin ich auf folgende Code-Schnippsel gestoßen. js scrip & css script wie folgt:
JavaScript: JavaScript
- <script>
- jQuery(document).ready(function($) {
- 'use strict';
- // Gather all videos
- var $all_videos = $('body').find( 'iframe[src*="player.vimeo.com"], iframe[src*="youtube.com"], iframe[src*="youtube-nocookie.com"], iframe[src*="dailymotion.com"], iframe[src*="kickstarter.com"][src*="video.html"], object, embed' );
- $all_videos.not( 'object object' ).each( function() {
- var $video = $(this);
- if ( $video.parents( 'object' ).length )
- return;
- if ( ! $video.prop( 'id' ) ) $video.attr( 'id', 'rvw' + Math.floor( Math.random() * 999999 ) );
- $video.wrap( '<div class="video-container"></div>' )
- } );
- } );
- </script>
und
Ich bin keen Scriptler, darum meine Frage: Würde der auch in WS X5 funktionieren?
Wenn nein: Geschenkt!
Wenn ja: Wo und wie nutzt man den in WS X5?