Coder Social home page Coder Social logo

arslanameer / ui-component-jquery-previewslider Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 0.0 9.73 MB

A Simple ๐Ÿ‘Œ Elegant ๐Ÿ’Ž and Lightweigh ( โ› Customized) Previewer Slider with Thumbnails Made with HTML CSS & JQuery.

License: GNU General Public License v3.0

JavaScript 54.24% CSS 4.51% HTML 41.26%
arslan-ameer imageslider imagepreview thumbnail-images html5 css3 javascript jquery jquery-slider light-slider

ui-component-jquery-previewslider's Introduction

๐Ÿ–ผ JQuery Preview Slider ๐Ÿ–ผ

CDNJS GitHub license GitHub repo documentation Open Source Love License: GPL v3

forthebadge Author

A Simple ๐Ÿ‘Œ Elegant ๐Ÿ’Ž and Lightweigh ( โ› Customized) Previewer Slider with Thumbnails Made with HTML CSS & JQuery.

Many Thanks To ๐Ÿ™ JQuery Light Slider by sachinchoolur and JQuery Zoom by Jack Moore . ๐Ÿ™‡โ€โ™‚๏ธ


DEMO

๐Ÿ‘‰ Try Live Demo


โœ About ๐Ÿ’ก:

This Previewer is made with html css and JQuery. It uses JQuery to slide images automatically and through navigation buttons, as well as ZOOM effect within image canvas on mouse over. This Previewer Slider is Made/Customized for standard use, as a product Images Preview.

NOTE: I set Iage Previwer's css and settings for Demo purpose.

Try & modify it as you need.

๐Ÿ’ก How To Use ๐Ÿ”ฌ :

โž• Add minifed CSS (styling File) and JS (script File) links inside <head> tag of your html file. These files can be found in dist/assets/css and dist/assets/js folders.

<link rel="stylesheet" href="assets/css/imagepreviewer.min.css" />

And because this slider is JQuery dependent. You can either download Jquery from website or use bellow cdn link.

Add this link inside of <head> tag.

<!-- Jquery Script Linking -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
OR
<script src="assets/js/jquery-3.3.1.min.js"></script>

<!-- Main Previewer Script Linking -->
<script src="assets/js/imagepreviewer.min.js"></script>

โž• Add Markup in your body:

<body>
	<div class="demo">
		<ul id="lightSlider">
			<li data-thumb="assets/images/d500a.jpg">
				<img src="assets/images/d500a.jpg" />
			</li>
			<li data-thumb="assets/images/d500b.jpg">
				<img src="assets/images/d500b.jpg" />
			</li>
			<li data-thumb="assets/images/d500c.jpg">
				<img src="assets/images/d500c.jpg" />
			</li>
			<li data-thumb="assets/images/d500d.jpg">
				<img src="assets/images/d500d.jpg" />
			</li>
			<li data-thumb="assets/images/d500e.jpg">
				<img src="assets/images/d500e.jpg" />
			</li>
		</ul>
	</div>
	<script>
		// Will Add Image Previewer Slider & Zoom on Hover Initializing Script Here
	</script>
</body>

Finally โž• Add this script to your file within separate <script>...</script> tag to initialize your Image Slider.

//  Image Slider With Thumbnail Initialization

$(document).ready(function() {
	$('#lightSlider').lightSlider({
		gallery: true, // Show Thumbnails Panel
		item: 1, // Items or Images in Main Display Are. (Suitable for Content Slider)
		loop: true, // Repeat Images
		slideMargin: 1, // Spaces Between Main Slides Images
		thumbItem: 4, // Number Of Thumbnails to show on THumbnail Panel
		speed: 800, // Image Change : Slider Speed in Miliseconds ms
		auto: false, // Auto play Slideshow On
		pause: 5000, // Pause Between Each Slide Change
	});
});

$('li>img')
	.wrap('<span style="display:inline-block"></span>')
	.css('display', 'block')
	.parent()
	.zoom({
		magnify: 1.3,
	});
// To use zoom with img elements, they will need to be wrapped with another element.

YOU'RE DONE! ๐ŸŽ†๐ŸŽ‡๐ŸŽ‰๐Ÿ‘๐Ÿ‘


Additional Settings ๐Ÿ˜Ž

You can add or modify Image Previewer Slider settings & in script file. following are complete list of settings you can apply.

$(document).ready(function() {
	$('#lightSlider').lightSlider({
		item: 3,
		autoWidth: false,
		slideMove: 1, // slidemove will be 1 if loop is true
		slideMargin: 10,

		addClass: '',
		mode: 'slide',
		useCSS: true,
		cssEasing: 'ease', //'cubic-bezier(0.25, 0, 0.25, 1)',//
		easing: 'linear', //'for jquery animation',////

		speed: 400, //ms'
		auto: false,
		loop: false,
		slideEndAnimation: true,
		pause: 2000,

		keyPress: false,
		controls: true,
		prevHtml: '',
		nextHtml: '',

		rtl: false,
		adaptiveHeight: false,

		vertical: false,
		verticalHeight: 500,
		vThumbWidth: 100,

		thumbItem: 10,
		pager: true,
		gallery: false,
		galleryMargin: 5,
		thumbMargin: 5,
		currentPagerPosition: 'middle',

		enableTouch: true,
		enableDrag: true,
		freeMove: true,
		swipeThreshold: 40,

		responsive: [],

		onBeforeStart: function(el) {},
		onSliderLoad: function(el) {},
		onBeforeSlide: function(el) {},
		onAfterSlide: function(el) {},
		onBeforeNextSlide: function(el) {},
		onBeforePrevSlide: function(el) {},
	});
});

For Further Guidance and Information Please Visit: http://sachinchoolur.github.io/lightslider/ & http://www.jacklmoore.com/zoom/

๐Ÿ“„ License ๐Ÿ”

Ui-Component-JQuery-PreviewSlider (Images Gallery Preview) Copyright (C) 2019 - Arslan Ameer

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/

ui-component-jquery-previewslider's People

Contributors

arslanameer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.