Skip to content

Responsive-Sprite displays video preview thumbnails on mouse over (hover). It's a diashow.

License

Notifications You must be signed in to change notification settings

lidox/responsive-sprite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

responsive-sprite.js 💥

Description

Responsive-Sprite displays video preview thumbnails on mouse over (hover). It's a diashow.

Demo

demo-gif

Installation

    <script>
        $( document ).ready(function() {
            var thumbs = new VideoThumbnail();
            thumbs.setThumbnailClassName('this-is-spartaaa');
            thumbs.setThumbnailCountOfSprite(6);
            thumbs.imagePaddingBottomInPercentage(100);
            thumbs.setMouseMoveActive();
            thumbs.displayThumbs();
            
            // example 2: fifty-images
            var thumbsSecondRow = new VideoThumbnail();
            thumbsSecondRow.setThumbnailClassName('fifty-images');
            thumbsSecondRow.setThumbnailCountOfSprite(50);
            thumbsSecondRow.imagePaddingBottomInPercentage(43);
            thumbsSecondRow.setMouseMoveActive();
            thumbsSecondRow.displayThumbs();
        });
    </script>
  • Now your HTML should contain these div elements
<div class="this-is-spartaaa" data-defaultimgnr="5" data-img="/assets/super-sprite.jpg"></div>

About

Responsive-Sprite displays video preview thumbnails on mouse over (hover). It's a diashow.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published