Skip to content

rudeshko/jquery-gallery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

jQuery-Based Gallery for Images, Videos, etc.

Adds a simple gallery to your site. Supports any HTML element.

Requirements

  1. jQuery library is a requirement for this plugin
  2. Each item in the gallery has to have a dr-gallery-item class

Optional

  1. To disable 'next' feature by clicking anywhere on the media item for only selected items, add class dr_gallery_click_disable to your dr-gallery-item element.

Parameters

  1. autoscroll - Default: Boolean true; Whether gallery should autoscroll through the items using time interval.
  2. interval - Default: Int 10; If 'autoscroll' is true, scroll after this number of seconds to the next slide.
  3. mediaClickDisabled - Default: Boolean false; Global boolean to disable 'go to next item' feature by clicking anywhere on the media item.
  4. showNav - Default: Boolean true; Whether navigation bar should be shown at the bottom of the gallery.

How To Use

<head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="./js/dr_gallery.js"></script>
    <link href="./css/dr_gallery.css" rel="stylesheet" />
</head>
<div class="test-gallery">
    <div class="dr_gallery-item">
        <img src="./images/1.jpg" title="" alt="" />
    </div>
    <div class="dr_gallery-item">
        <img src="./images/2.jpg" title="" alt="" />
    </div>
    <div class="dr_gallery-item">
        <img src="./images/3.jpg" title="" alt="" />
    </div>
</div>

<script>
$(".test-gallery").dr_gallery({
    autoscroll: true,
    interval: 10,
    mediaClickDisabled: false,
    showNav: true
});
</script>

About

jQuery-Based Gallery for Images, Videos, etc.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published