• Stars
    star
    161
  • Rank 225,900 (Top 5 %)
  • Language
    JavaScript
  • Created over 11 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Responsive jQuery Content Slider

Liquid Slider

A Responsive jQuery HTML Content Slider

Demo Page | Example Page (Advanced)

I'm on Twitter: @Kevin Batdorf

Update

I'm going to make this compatible with NPM soon, but for now there's a work around. Two issues:

  1. You still need to load in the dependencies on your own
  2. the asset files wil have to be manually moved, or overridden in your own css

Installation

NPM

npm install --save git+https://[email protected]/KevinBatdorf/liquidslider.git

then in your js file add

import 'liquidslider/js/jquery.liquid-slider.min.js'

The stylesheet is plain css, but you can load it in with sass

@import "node_modules/liquidslider/css/liquid-slider";

The manual way:

  1. Download the files to your working directory.
  2. Link files in the header and footer.
<head>
  <link rel="stylesheet" href="./dist/css/liquid-slider.css">
</head>
<body>
  <footer>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.touchswipe/1.6.4/jquery.touchSwipe.min.js"></script>
    <script src="./dist/js/jquery.liquid-slider.min.js"></script>
  </footer>
</body>

How to use

Structure your html in a manner similar to below:

<section class="liquid-slider" id="main-slider">
  <div>
    <h2 class="title">Slide 1</h2>
    <p>Content</p>
  </div>
  <div>
    <h2 class="title">Slide 2</h2>
    <p>Content</p>
  </div>
</section>
  1. Initialize the content slider somewhere after the script.
jQuery(function($) {
  $('#main-slider').liquidSlider();
});

If you would like to edit a setting, do so like this:

jQuery(function($) {
  $('#main-slider').liquidSlider({
    setting: value,
    setting: value
  });
});

Default Settings

autoHeight: true,
minHeight: 0,
heightEaseDuration: 1500,
heightEaseFunction: 'easeInOutExpo',

slideEaseDuration: 1500,
slideEaseFunction: 'easeInOutExpo',
slideEaseFunctionFallback: 'swing',
animateIn: 'bounceInRight',
animateOut: 'bounceOutRight',
continuous: true,
fadeInDuration: 500,
fadeOutDuration: 500,

autoSlide: false,
autoSlideDirection: 'right',
autoSlideInterval: 6000,
forceAutoSlide: false,
pauseOnHover: false,

dynamicArrows: true,
dynamicArrowsGraphical: true,
dynamicArrowLeftText: '&#171; left',
dynamicArrowRightText: 'right &#187;',
hideSideArrows: false,
hideSideArrowsDuration: 750,
hoverArrows: true,
hoverArrowDuration: 250,

dynamicTabs: true,
dynamicTabsHtml: true,
includeTitle: true,
panelTitleSelector: '.title',
dynamicTabsAlign: 'left',
dynamicTabsPosition: 'top',
navElementTag: 'div',

firstPanelToLoad: 1,
hashLinking: false,
hashTitleSelector: '.title',

keyboardNavigation: false,
leftKey: 39,
rightKey: 37,
panelKeys: {
  1: 49,
  2: 50,
  3: 51,
  4: 52
},

responsive: true,
mobileNavigation: true,
mobileNavDefaultText: 'Menu',
mobileUIThreshold: 0,
hideArrowsWhenMobile: true,
hideArrowsThreshold: 0,
useCSSMaxWidth: 3000,

preload: function() {
  this.finalize();
},
onload: function() {},
pretransition: function() {
  this.transition();
},
callback: function() {},

preloader: false,
swipe: true,
swipeArgs: undefined

Versions

Version 2.3.8

  • Fixes bug with text arrows and no mobile nav

Version 2.3.7

  • Fixes compatability with Bootstrap

Version 2.3.6

  • Recalculates panel width based on container
  • Minor CSS update

Version 2.3.2

  • Fixes trim

Version 2.3.2

  • Updates examples
  • Fixes hashlink bug

Version 2.3.1

  • Updates for jQuery repo

Version 2.3.0

  • Adds bower
  • Uses px instead of %

Version 2.2.0

  • Fixes hash linking (new approach)
  • Uses API for cross links

Version 2.1

  • Fixes currentPanel bug
  • Switches to a new (better?) modular strategy
  • Switches license to MIT
  • Improves coding style
  • Sets focus/blur for autoslide
  • Fixes class for cross links
  • sanaziteNumber() -> sanitizeNumber() spelling fix
  • Fixes autoSlide pauseOnHover bug

Version 2.0.12

  • Adds currentPanel class to the current panel

Version 2.0.11

  • Had to revert a autoslide bug fix

Version 2.0.10

  • Fixes how RegEx works (hashLinking)
  • Fixes a bug when dynamic arrows is disabled (@joeworkman)
  • Adds a fallback for animate.css when css not supported (@joeworkman)
  • Fixes autoslide bug (@joeworkman)

Version 2.0.9

  • Fixes a few of the problems with cross links

Version 2.0.8

  • Changes the way the slider builds with fade

Version 2.0.7

  • Fixes swipe bug

Version 2.0.6

  • Fixes mobile width

Version 2.0.5

  • Updates touchSwipe and allows user to add options (not documented though)

Version 2.0.4

  • Changes how the slider downgrades to IE

Version 2.0.3

  • Fixes a bug that didn't call pretransition when using animate.css

Version 2.0.2

  • Fixes a bug that loses menu names in select box when includeTitle:false

Version 2.0.1

  • Fixes auto height on resize bug

Version 2.0.0

  • Completely rebuilt from the ground up
  • New API
  • Faster, smaller, more flexible
  • Many, many new features

Version 1.3.7

  • Overhauls the cross linking functionality
  • Removes the hashCrossLinks setting.
  • Contributed by @joeworkman

Version 1.3.6

  • Fixes autoslide bug and callback functionality
  • Updates website on jquery repository

Version 1.3.5

  • Prepares code for new site launch
  • Fixes a bug when hover arrows is disabled

Version 1.3.4

  • Fixes a bug when using fade transitions
  • Allows crossLinks to control multiple sliders

Version 1.3.3

  • Fixes an autoslide bug

Version 1.3.2

  • Fixes a hashLinking bug

Version 1.3.1

  • Fixes a bug when using fade and swipe

Version 1.3.0

  • Fixes how the current class is applied when nesting sliders

Version 1.2.9

  • Fixes and updates the TouchSwipe settings and script

Version 1.2.8

  • Fixes the way the preloader works when continuous is off

Version 1.2.7

  • Fixes some bugs

Version 1.2.6

  • Fixes a few minor bugs.
  • Organizes code for upcoming custom build

Version 1.2.4 - 1.2.5

  • Pushes new version # to jQuery repository.

Version 1.2.3

  • Fixes a bug when using crosslinks on multiple sliders wont apply the current class properly.

Version 1.2.2

  • Fixes a bug where keyboard navigation fails.

Version 1.2.1

  • Removes the depreciated $.browser() call.
  • Fixes a bug when using hashNames that started the slider on the wrong panel.

Version 1.2.0

  • Adapts a new semantic versioning system
  • Adds touch functionality via touchSwipe (thanks @appzuka for recommending this plugin)
  • Removes jQuery and included only the link to the CDN
  • Replaces jQueryUI easing with the much lighter jQuery Easing plugin.

More Repositories

1

codaslider

JQuery Slider Plugin
JavaScript
121
star
2

code-block-pro

A Gutenberg code block with syntax highlighting powered by VS Code
TypeScript
107
star
3

obsidian-raycast

Raycast extension with commands for the note taking app Obsidian.
TypeScript
89
star
4

alpine-inline-devtools

An easy way to monitor your state while developing with Alpine
JavaScript
65
star
5

gutenberg-rust-starter

Gutenberg + Rust + TypeScript
JavaScript
37
star
6

block-diffusion

A WordPress block to generate images from text prompts
TypeScript
24
star
7

wavy-divider

A WordPress block to add colorful creative wavy svg divider shapes
JavaScript
19
star
8

pattern-css

A WordPress editor plugin to safely add CSS to your reusable patterns or any random pattern.
JavaScript
18
star
9

alpine-auto-interval

A lightweight interval plugin for Alpine.js that lets you call a function every n milliseconds
JavaScript
12
star
10

tailwind-custom-cdn

Tailwind CSS builds for CDN access (Template Repository)
CSS
12
star
11

beats-kv-demo

A simple, multiplayer beat machine using Deno KV
TypeScript
11
star
12

alpine-plugin-template

JavaScript
10
star
13

laravel-forge-raycast

Raycast extension to manage your Forge servers
TypeScript
10
star
14

animate-in-view

A Gutenberg block to animate in a block when in view
TypeScript
7
star
15

replicate-raycast

A Raycast Extension to view your replicate.com image collection
TypeScript
6
star
16

image-filters

A Gutenberg block providing image filters processed with Rust/wasm
TypeScript
6
star
17

wp-command-palette-tools

A collection of productivity tools for the WP Command Palette
JavaScript
6
star
18

unsplash-block-plugin

A WordPress Gutenberg block plugin to interface with the Unsplash API
TypeScript
6
star
19

alpine-observe-other-components

A lightweight observer function for Alpine.js that lets you monitor state on other Alpine components
JavaScript
6
star
20

steam-api

A simple Next.js API to search Steam games and get game data
TypeScript
6
star
21

wp-xeet

A static Tweet block plugin for WordPress (no iframe)
TypeScript
5
star
22

alpine.js-gutenberg

A demo showing Alpine with WordPress's Gutenberg editor
JavaScript
5
star
23

laravel-artisan-raycast

Raycast extension for searching Artisan commands
TypeScript
4
star
24

steam-raycast

TypeScript
3
star
25

alpine-auto-init

A lightweight auto init function for Alpine.js
JavaScript
3
star
26

wordpress-cypress-github-action-workflow

JavaScript
3
star
27

artisan-api

Always up to date api to search Laravel Artisan commands
TypeScript
3
star
28

auth-license-server

TypeScript
2
star
29

unsplash-api

TypeScript
2
star
30

tailwind-css-cdn

CSS
1
star
31

dotfiles

Shell
1
star
32

electron-vue-starter

JavaScript
1
star
33

aoc2022

https://adventofcode.com/
JavaScript
1
star
34

wordpress-control-raycast

A Raycast extension to manage your WordPress sites.
TypeScript
1
star
35

quick-open-patterns

Opens the patterns modal when you type /patterns
TypeScript
1
star
36

val-town-raycast

Raycast extension for Val Town
TypeScript
1
star
37

interactivity-api-helpers

Helper library for building with the WordPress Interactivity API
TypeScript
1
star