Lazy Load Owl Carousel with Picturefill - lazy-loading

I am using the Owl Carousel and Picturefill plugins and I would like to lazy load the main slider images. Any help would be appreciated. In the example url, click on the "Responsive" thumbnail (second image after the YouTube thumbnail). Then expand/contract your browser window and you should see the image referenced being updated depending on the size of the browser.
Example url:
http://dx1showroom.azurewebsites.net/picturefill/2.html
Goals:
Use Owl Carousel - www.owlcarousel.owlgraphic.com
With Picturefill - http://scottjehl.github.io/picturefill/
Sync with second owl carousel slider
And lazy load main slider
I have working:
Owl carousels are working
Synced carousels (main & thumbnail sliders)
Loading images with Picturefill
HTML:
<div class="thumbnail-frame">
<div id="sliderStatus" class="image-count">
<span class="glyphicon icon-camera"></span>
<span class="currentItem"><span class="result"></span></span>/<span class="owlItems"><span class="result"></span></span>
</div>
<div id="slideshow-main" class="owl-carousel main-frame col-sm-8 col-md-8 col-lg-9">
<div class="item video"><iframe width="563" height="422" src="//www.youtube.com/embed/GZL6piSl5P8?rel=0" frameborder="0" allowfullscreen></iframe></div>
<div class="item">
<picture>
<!--[if IE 9]><video style="display: none;"><![endif]-->
<source srcset="http://placehold.it/1300x867" media="(min-width: 1200px)">
<source srcset="http://placehold.it/1000x667" media="(min-width: 992px)">
<source srcset="http://placehold.it/800x533" media="(min-width: 768px)">
<source srcset="http://placehold.it/650x433" media="(min-width: 600px)">
<source srcset="http://placehold.it/460x307" media="(min-width: 400px)">
<source srcset="http://placehold.it/320x213" media="(min-width: 100px)">
<!--[if IE 9]></video><![endif]-->
<img srcset="http://placehold.it/1300x867" alt="Picturefill Test">
</picture>
</div>
<div class="item video"><iframe width="563" height="422" src="//www.youtube.com/embed/akhmS1D2Ce4?rel=0" frameborder="0" allowfullscreen></iframe></div>
<div class="item">
<picture class="lazyOwl">
<!--[if IE 9]><video style="display: none;"><![endif]-->
<source srcset="https://media.dx1app.com/v1/media/53d68f53b43a22e37500027f.jpg" media="(min-width: 1200px)">
<source srcset="https://media.dx1app.com/v1/media/53d68f53b43a22e37500027f.jpg?width=1000" media="(min-width: 992px)">
<source srcset="https://media.dx1app.com/v1/media/53d68f53b43a22e37500027f.jpg?width=800" media="(min-width: 768px)">
<source srcset="https://media.dx1app.com/v1/media/53d68f53b43a22e37500027f.jpg?width=650" media="(min-width: 600px)">
<source srcset="https://media.dx1app.com/v1/media/53d68f53b43a22e37500027f.jpg?width=460" media="(min-width: 400px)">
<source srcset="https://media.dx1app.com/v1/media/53d68f53b43a22e37500027f.jpg?width=320" media="(min-width: 100px)">
<!--[if IE 9]></video><![endif]-->
<img srcset="https://media.dx1app.com/v1/media/53d68f53b43a22e37500027f.jpg" alt="Picturefill Test">
</picture>
</div>
</div>
<div id="slideshow-thumbnails" class="owl-carousel thumbnail-frame">
<div class="item"><a><img src="http://img.youtube.com/vi/GZL6piSl5P8/1.jpg" alt="" class="img-responsive"></a></div>
<div class="item"><a><img src="http://placehold.it/135x90&text=Responsive" alt="" class="img-responsive"></a></div>
<div class="item"><a><img src="http://img.youtube.com/vi/akhmS1D2Ce4/1.jpg" alt="" class="img-responsive"></a></div>
<div class="item"><a><img src="https://media.dx1app.com/v1/media/53d68f53b43a22e37500027f.jpg?width=300" alt="" class="img-responsive"></a></div>
</div>
</div>
JavaScript:
$(document).ready(function() {
// Owl Slider Function
function sync(el){
var current = this.currentItem;
$("#slideshow-thumbnails")
.find(".owl-item")
.removeClass("synced")
.eq(current)
.addClass("synced")
if($("#slideshow-thumbnails").data("owlCarousel") !== undefined){
center(current)
}
updateResult(".owlItems", this.owl.owlItems.length);
updateResult(".currentItem", this.owl.currentItem +1);
}
// Owl Slider Function
function center(number){
var owlSync2visible = owlSync2.data("owlCarousel").owl.visibleItems;
var num = number;
var found = false;
for(var i in owlSync2visible){
if(num === owlSync2visible[i]){
var found = true;
}
}
if(found===false){
if(num>owlSync2visible[owlSync2visible.length-1]) {
owlSync2.trigger("owl.goTo", num - owlSync2visible.length+2)
} else {
if(num - 1 === -1){
num = 0;
}
owlSync2.trigger("owl.goTo", num);
}
} else if(num === owlSync2visible[owlSync2visible.length-1]) {
owlSync2.trigger("owl.goTo", owlSync2visible[1])
} else if(num === owlSync2visible[0]){
owlSync2.trigger("owl.goTo", num-1)
}
}
function updateResult(pos,value){
sliderStatus.find(pos).find(".result").text(value);
}
// Owl Slider
var sliderStatus = $("#sliderStatus");
var owlSync1 = $("#slideshow-main").owlCarousel({
singleItem : true,
slideSpeed : 500,
navigation: true,
pagination: false,
// itemsScaleUp: true,
afterAction : sync,
responsiveRefreshRate : 200,
navigation: true,
navigationText: [
'<span class="thumb-prev"><span class="glyphicon icon-prev-arrow"></span></span>',
'<span class="thumb-next"><span class="glyphicon icon-next-arrow"></span></span>'
],
afterUpdate : function() {
sliderMainMaxHeight('#slideshow-main');
posSliderControls('#slideshow-main');
posAlignImgVertically('#slideshow-main');
}
});
var owlSync2 = $("#slideshow-thumbnails").owlCarousel({
items : 8,
itemsDesktop : [1199,8],
itemsDesktopSmall : [992,8],
itemsTablet : [768,6],
itemsMobile : [520,3],
pagination:false,
responsiveRefreshRate : 100,
scrollPerPage: true,
navigation: true,
navigationText: [
'<span class="thumb-prev"><span class="glyphicon icon-prev-arrow"></span></span>',
'<span class="thumb-next"><span class="glyphicon icon-next-arrow"></span></span>'
],
afterInit : function(el){
el.find(".owl-item").eq(0).addClass("synced");
},
afterUpdate : function() {
sliderMainMaxHeight('#slideshow-thumbnails');
posSliderControls('#slideshow-thumbnails');
posSliderImgCounter('#slideshow-thumbnails');
posAlignImgVertically('#slideshow-thumbnails');
}
});
$("#slideshow-thumbnails").on("click", ".owl-item", function(e){
e.preventDefault();
var number = $(this).data("owlItem");
owlSync1.trigger("owl.goTo",number);
});
$(".owl-carousel").fitVids();;
});

In case you don't need to support IE8:
use lazysizes - responsive image lazy laoder

Related

Carousel not working in Vue js but working in simple php file

I am using owl.carousel in my vue app. But carousel is not showing up on the page. I have include (owl.carousel.min.css) and other relevant files(jquery,bootstrap) inside my index.html. These files can also be seen in network tab of the browser which mean files are loading but no carousel(or images) are seen.When I remove owl.carousel.min.css from index, it displays images used inside carousel on top of one another but no carousel. Any idea what the issue might be..??Thank you.
<div class="banner-slider">
<div class="container">
<div class="row">
<div class="carousel-wrap">
<div id="sync2" class="navigation-thumbs owl-
carousel">
<div class="item">
<img src="./images/bslide4.png">
<div class="details">
<p>Alex</p>
<small>Guitarist</small>
</div>
</div>
<div class="item">
<img src="./images/bslide1.png">
<div class="details">
<p>MIRA</p>
<small>Filmmaking</small>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
And
var sync1 = $(".slider");
var sync2 = $(".navigation-thumbs");
var thumbnailItemClass = '.owl-item';
var slides = sync1.owlCarousel({
video:true,
startPosition: 3,
items:1,
loop:true,
margin:10,
autoplay:true,
autoplayHoverPause:false,
nav: false,
dots: true,
responsive: {
0: {
items: 1,
loop:true
},
600: {
items: 1,
loop:true
},
1000: {
items: 1,
loop:true
}
}
}).on('changed.owl.carousel', syncPosition);

How to close Modal de Materialize CSS with Vue

I am trying to close a Modal of Materialize CSS if the validation is correct but I can not find the form.
The simplest thing was to do a type validation:
v-if = "showModal" and it works but leaves the background of the Modal and although click does not disappear. The background is a class named 'modal-overlay'
This is my code:
<i class="material-icons modal-trigger tooltipped" style="margin-left: 2px;
color:#ffc107; cursor:pointer;" #click="getById(article), fillSelectCategories(),
titleModal='Edit', type='edit'" data-target="modal1">edit</i>
I imported M from the JS file of MaterilizeCSS
import M from "materialize-css/dist/js/materialize.min";
Method:
update(){
var elem = document.querySelectorAll('.modal');
var instance = M.Modal.getInstance(elem);
console.log(instance)
That returns 'undefined'
I tried this too on the update() method:
var elem = document.querySelectorAll('.modal');
elem.close();
M.Modal.close()
I initialize the modal from mounted and it works fine but I can not close it at the moment I require it.
mounted(){
var elems = document.querySelectorAll('.modal');
var instances = M.Modal.init(elems, options);
}
But I know what else to try :(
It really is difficult to know why things aren't working for you without looking further into your code, but I've created this simple example to demonstrate how it could be done ..
new Vue({
el: "#app",
data: {
modalInstance: null,
closeAfterTimeElapsed: true,
seconds: 1
},
mounted() {
const modal = document.querySelector('.modal')
this.modalInstance = M.Modal.init(modal)
const select = document.querySelector('select');
M.FormSelect.init(select);
M.updateTextFields();
},
methods: {
handleClick() {
if (this.closeAfterTimeElapsed) {
setTimeout(() => { this.modalInstance.close() }, this.seconds * 1000)
}
}
}
})
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue#2.5.17/dist/vue.js"></script>
<div id="app">
<!-- Modal Trigger -->
<button #click="handleClick" data-target="modal1" class="btn modal-trigger">Modal</button>
<!-- Modal Structure -->
<div id="modal1" class="modal">
<div class="modal-content">
<h4>Modal Header</h4>
<p>A bunch of text</p>
</div>
<div class="modal-footer">
Agree
</div>
</div>
<br>
<br>
<div class="row">
<div class="input-field col s6">
<select v-model="closeAfterTimeElapsed">
<option :value="false">False</option>
<option :value="true">True</option>
</select>
<label>Close Modal After</label>
</div>
<div class="input-field col s6">
<input id="seconds" type="number" v-model="seconds">
<label for="seconds">Seconds</label>
</div>
</div>
</div>
See this JSFiddle

v-on:click not working in a child component

First thing first I'm new to vue.js.
what I'm trying to do when the user click on the expander anchor tag in the item-preview component the item-details will display and the item-preview will be hide. Now the problem occurs when the item-preview displayed and i'm trying to toggle it by clicking its own expander anchor tag. I do not whats wrong with this.
Here is my HTML templates.
<script type="text/x-template" id="grid">
<div class="model item" v-for="entry in data">
<item-preview v-bind:entry="entry" v-if="entry.hide == 0">
</item-preview>
<item-details v-bind:entry="entry" v-if="entry.hide == 1">
</item-details>
</div>
</script>
<script type="text/x-template" id="item-preview">
<header class="preview">
<a class="expander" tabindex="-1" v-on:click="toggle(entry)"></a>
<span class="name rds_markup">
{{ entry.name }}
</span>
</header>
</script>
<script type="text/x-template" id="item-details">
<div class="edit details">
<section class="edit" tabindex="-1">
<form action="#">
<fieldset class="item name">
<a class="expander" v-on:click="toggle(entry)"></a>
{{ entry.name }}
</fieldset>
</form>
</section>
</div>
</script>
And here how I called the grid component on my view.
<grid
:data="packages">
</grid>
And for my Vue implementation
var itemPreview = Vue.component('item-preview',{
'template':"#item-preview",
'props':{
entry:Object
},
methods:{
toggle:function(entry){
entry.hide = !!entry.hide;
return true;
}
}
});
var itemDetails = Vue.component('item-details',{
'template':"#item-details",
'props':{
entry:Object
},
methods:{
toggle:function(entry){
entry.hide = !!entry.hide;
return true;
}
}
});
var grid = Vue.component('grid',{
'template':"#grid",
'props':{
data:Array,
},
components:{
'item-preview': itemPreview,
'item-details': itemDetails
},
methods:{
toggle:function(entry){
entry.hide = !!entry.hide;
return true;
}
}
});
var vm = new Vue({
el:'#app',
data:{
message:'Hello',
packages:{}
},
ready:function(){
this.fetchPackages();
},
methods:{
fetchPackages:function(){
this.$http.get(url1,function( response ){
this.$set('packages',response);
});
},
}
});
Silly me. It took me 30minutes to figure out what is wrong with this code.
What I did to fix this is instead of entry.hide = !!entry.hide; I use entry.hide = true in item-preview component and in the item-details entry.hide = false. this fix my issue.

Magnific pop-up synchronized with slider

Just wondering if it is possible to synchronize Magnific pop-up with a slider(flexslider or slick, for example) so that when you change slide on Magnific pop-up the slider in the background also changes.
EDIT
$('.slick-slider').magnificPopup({
delegate: '.slides:not(.slick-cloned) a',
type: 'image',
mainClass: 'mfp-fade',
fixedContentPos: false,
removalDelay: 350,
pauseOnHover: false,
gallery:{
enabled: true,
tCounter: '<span class="mfp-counter">%curr% of %total%</span>'
},
callbacks: {
beforeClose: function() {
$('.slick-slider').slick('slickGoTo', parseInt(this.index - 1));
// works better with the code bellow but sometimes gets stuck between 2 slides
$('.slick-slider').slick('slickGoTo', parseInt(this.index));
}
}
});
It's definitely possible. Here's an example using Slick.js.
Working Example
HTML
<div class="carousel">
<img src="//satyr.io/600x400/1" width="600" height="400" alt="" />
<img src="//satyr.io/600x400/2" width="600" height="400" alt="" />
<img src="//satyr.io/600x400/3" width="600" height="400" alt="" />
<img src="//satyr.io/600x400/4" width="600" height="400" alt="" />
<img src="//satyr.io/600x400/5" width="600" height="400" alt="" />
</div>
JS
$(document).ready(function() {
var $carousel = $('.carousel');
$carousel
.slick()
.magnificPopup({
type: 'image',
delegate: 'a:not(.slick-cloned)',
gallery: {
enabled: true
},
callbacks: {
open: function() {
var current = $carousel.slick('slickCurrentSlide');
$carousel.magnificPopup('goTo', current);
},
beforeClose: function() {
$carousel.slick('slickGoTo', parseInt(this.index));
}
}
});
});
Dependencies
Also, make sure you pull in the dependencies for jQuery, Slick, and Magnific Popup.
Update
Accounts for cloned item created by Slick
Updates Magnific Popup with current slide when opened via keyboard navigation
And if you have multiple .carousel instances you can do like this:
https://jsfiddle.net/9dyh2yjt/98/
$(function() {
$('.carousel').each(function() {
var gallery = $(this);
gallery
.slick()
.magnificPopup({
type: 'image',
delegate: 'a:not(.slick-cloned)',
gallery: {
enabled: true
},
callbacks: {
open: function() {
var current = gallery.slick('slickCurrentSlide');
console.log(current);
gallery.magnificPopup('goTo', current);
},
beforeClose: function() {
gallery.slick('slickGoTo', parseInt(this.index));
}
}
});
});
});
<link href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.min.css" rel="stylesheet"/>
<link href="https://cdn.jsdelivr.net/npm/slick-carousel#1.8.1/slick/slick.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/slick-carousel#1.8.1/slick/slick.min.js"></script>
<div class="carousel">
<img src="//satyr.io/600x400/1" width="600" height="400" alt="" />
<img src="//satyr.io/600x400/2" width="600" height="400" alt="" />
<img src="//satyr.io/600x400/3" width="600" height="400" alt="" />
<img src="//satyr.io/600x400/4" width="600" height="400" alt="" />
<img src="//satyr.io/600x400/5" width="600" height="400" alt="" />
</div>
<div class="carousel">
<img src="//satyr.io/600x400/1" width="600" height="400" alt="" />
<img src="//satyr.io/600x400/2" width="600" height="400" alt="" />
<img src="//satyr.io/600x400/3" width="600" height="400" alt="" />
<img src="//satyr.io/600x400/4" width="600" height="400" alt="" />
<img src="//satyr.io/600x400/5" width="600" height="400" alt="" />
</div>

HTML 5 dynamic videos (not playlist) - Trying to simply the JS code into a an array

I have 8 videos that when clicked on their appropiate link they open a modal window - the video then plays. It work very well using the code i have created below however i am sure there must be a better way write this to reduce the JS code.
Guidence would be most welcomed.
- Have not found much on the forum, and nothing that solves this issue. (hence my code works but is very long). - thank you.
NOT WORKING IN IE8*
THE HTML PAGE WITH LINK
<div class="caption"><?php echo tep_image(DIR_IMAGES.'media/video_atr_cm.jpg','CM Computer','','','');?>
<div class="clearfix"></div>
<h5><?php echo ANIMATED_MEDIA ?></h5>
<h3>CM Computer</h3>
</div>
</a>
<div class="thumbnail-pad"><?php echo TEXT_BUTTON_READ_MORE?></div>
</div>
THE MODAL POPUP CONTAINER:
<!-- modal video -->
<div id="modal-gallery-video" class="modal modal-gallery hide fade" tabindex="-1">
<div class="modal-header"> <a class="close" data-dismiss="modal">×</a>
<h3 class="modal-title"></h3>
</div>
<div class="modal-body">
<video id="video1" controls width="560" height="315">
<source id="mp4" src="" type="video/mp4" />
<source id="webm" src="" type="video/webm" />
<source id="ogg" src="" type="video/ogg" />
<object type="application/x-shockwave-flash" data="http://player.longtailvideo.com/player.swf" width="560" height="315">
<param name="movie" value="http://player.longtailvideo.com/player.swf" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="flashVars" value="" />
</object>
</video>
</div>
<div class="modal-footer">
<a class="btn btn-success" onclick="playPause()"><i class="icon-play icon-white"></i> <span>Play/Pause</span> </a>
<a class="btn btn-info" onclick="makeSmall()"><span>Small</span></a>
<a class="btn btn-warning" onclick="makeNormal()"><span>Normal</span></a>
<a class="btn btn-info" onclick="makeBig()"><span>Big</span></a>
</div>
</div>
THE JQUERY:
$(function(){
var player = document.getElementById('video1');
var mp4Vid = document.getElementById('mp4');
var oggVid = document.getElementById('ogg');
var webmVid = document.getElementById('webm');
var swfVid = document.getElementById('swf');
document.getElementById('rockmetal').onclick = function() {
player.pause();
$(mp4Vid).attr('src', "img/video/rockmetal.mp4");
$(oggVid).attr('src', "img/video/rockmetal.ogg");
$(webmVid).attr('src', "img/video/rockmetal.webm");
$(swfVid).attr('value', "controlbar=over&file=http%3A%2F%2Fwww.xxxxx.com%2Ftest%2Fimg%2Fvideo%2Frockmetal.mp4");
player.load();
}
document.getElementById('jet').onclick = function() {
player.pause();
$(mp4Vid).attr('src', "img/video/jet.mp4");
$(oggVid).attr('src', "img/video/jet.ogg");
$(webmVid).attr('src', "img/video/jet.webm");
$(swfVid).attr('value', "controlbar=over&file=http%3A%2F%2Fwww.xxxx.com%2Ftest%2Fimg%2Fvideo%2Fjet.mp4");
player.load();
}
document.getElementById('flight').onclick = function() {
player.pause();
$(mp4Vid).attr('src', "img/video/flight.mp4");
$(oggVid).attr('src', "img/video/flight.ogg");
$(webmVid).attr('src', "img/video/flight.webm");
$(swfVid).attr('value', "controlbar=over&file=http%3A%2F%2Fwww.xxxx.com%2Ftest%2Fimg%2Fvideo%2Fflight.mp4");
player.load();
}
document.getElementById('heli').onclick = function() {
player.pause();
$(mp4Vid).attr('src', "img/video/helicopter.mp4");
$(oggVid).attr('src', "img/video/helicopter.ogg");
$(webmVid).attr('src', "img/video/helicopter.webm");
$(swfVid).attr('value', "controlbar=over&file=http%3A%2F%2Fwww.xxxxxx.com%2Ftest%2Fimg%2Fvideo%2Fhelicopter.mp4");
player.load();
}
document.getElementById('sub').onclick = function() {
player.pause();
$(mp4Vid).attr('src', "img/video/sub.mp4");
$(oggVid).attr('src', "img/video/sub.ogg");
$(webmVid).attr('src', "img/video/sub.webm");
$(swfVid).attr('value', "controlbar=over&file=http%3A%2F%2Fwww.xxxxxx.com%2Ftest%2Fimg%2Fvideo%2Fsub.mp4");
player.load();
}
document.getElementById('uav').onclick = function() {
player.pause();
$(mp4Vid).attr('src', "img/video/uav.mp4");
$(oggVid).attr('src', "img/video/uav.ogg");
$(webmVid).attr('src', "img/video/uav.webm");
$(swfVid).attr('value', "controlbar=over&file=http%3A%2F%2Fwww.xxxxxx.com%2Ftest%2Fimg%2Fvideo%2Fuav.mp4");
player.load();
}
document.getElementById('cm').onclick = function() {
player.pause();
$(mp4Vid).attr('src', "img/video/intro.mp4");
$(oggVid).attr('src', "img/video/intro.ogg");
$(webmVid).attr('src', "img/video/intro.webm");
$(swfVid).attr('value', "controlbar=over&file=http%3A%2F%2Fwww.xxxx.com%2Ftest%2Fimg%2Fvideo%2Fintro.mp4");
player.load();
}
document.getElementById('tank').onclick = function() {
player.pause();
$(mp4Vid).attr('src', "img/video/tank.mp4");
$(oggVid).attr('src', "img/video/tank.ogg");
$(webmVid).attr('src', "img/video/tank.webm");
$(swfVid).attr('value', "controlbar=over&file=http%3A%2F%2Fwww.xxxxxxx.com%2Ftest%2Fimg%2Fvideo%2Ftank.mp4");
player.load();
}
});
<script type="text/javascript">
var loading = document.getElementById('player');
$('ul#allvid li').on('click', function() {var lash = $(this).attr('id');
$("#player").html("<source src='img/video/"+lash+".mp4' type='video/mp4'/><source src='img/video/"+lash+".webm' type='video/webm'/><source src='img/video/"+lash+".ogg' type='video/ogg'/><object type='application/x-shockwave-flash' data='img/video/player.swf' width='560' height='315'><param name='movie' value='img/video/player.swf'/><param name='allowFullScreen' value='true'/><param name='wmode' value='transparent'/><param name='flashVars' value='controlbar=over&file=http%3A%2F%2Fwww.xxxx.com%2Fimg%2Fvideo%2F"+lash+".mp4'/></object>");player.pause();player.load();
});
</script>
<!-- modal video -->
<div id="modal-gallery-video" class="modal modal-gallery hide fade" tabindex="-1">
<div class="modal-header"> <a class="close" data-dismiss="modal">x</a>
<h3 class="modal-title"></h3>
</div>
<div class="modal-body">
<video id="player" controls width="560" height="315">
</video>
</div>
<div class="modal-footer"> <a class="btn btn-success" onclick="playPause()"><i class="icon-play"></i> <span>Play/Pause</span> </a> <a class="btn btn-info" onclick="makeSmall()"> <span>Small</span></a> <a class="btn btn-warning" onclick="makeNormal()"><span>Normal</span></a> <a class="btn btn-info" onclick="makeBig()"><span>Big</span></a></div>
</div>