Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (enableWebm === "type-2") {
- $('a[href$=".webm"], a[href$=".WebM"], a[href$=".webM"], a[href$=".webM"], a[href$=".gifv"]').each(function(index, value) {
- var href = $(this).attr("href");
- $(this).after(" <button id='webm-" + index +"' class='btn' style='padding-left:3px;padding-right:3px;padding-top:1px;padding-bottom:1px'><i class='icon icon-play-circle'></i></button><div id='webm-image-" + index + "'><video controls loop><source src=\"" + href.replace(".gifv", ".webm") + "\" type=\'video/webm; codecs=\"vp8, vorbis\"\'></video></div>");
- $("#webm-image-" + index).hide();
- $("#webm-" + index).click(function() {
- $("#webm-image-" + index).toggle();
- });
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement