A module that lets you flick through content.

Overview

Rocket Flicker

A module that lets you flick through content.

Getting Started

Install via NPM.

npm install rocket-flicker

NOTE that this module has a dependency Rocket Tools (28kb) which will automatically be installed as well.

Start by including the necessary files.

<head>
   <link href="node_modules/rocket-flicker/css/flicker.min.css" rel="stylesheet" type="text/css">
</head>
<body>
   /* Your content goes here */
   <script src="node_modules/rocket-tools/js/tools.min.js"></script>
   <script src="node_modules/rocket-flicker/js/flicker.min.js"></script>
</body>

Basic Example

See the setup of the HTML and Javascript call below.

<div class="mod-flicker">
   <ul>
      <li data-background="image-url.jpg">
         <div class="mod-flicker-title">Example Heading</div>
         <div class="mod-flicker-text">Sub Text</div>
      </li>
      <li data-background="image-url.jpg">
         <div class="mod-flicker-title">Example Heading</div>
         <div class="mod-flicker-text">Sub Text</div>
      </li>
   </ul>
</div>

<script>
Rocket.flicker();
</script>

Initialisation

Each initialisation will return an array of module objects (An array will always be returned even if the target is an id). This includes the flicker element itself as well as relevant methods. For example:

const flickers = Rocket.flicker();

// The flickers and all methods
for (let i = 0, len = flickers.length; i < len; i++) {
   console.log(flickers[i].flicker);
   flickers[i].move(3); // Move this flicker to position 3
   flickers[i].start(); // Start the auto flicker
   flickers[i].stop(); // Stop the auto flicker
}

Alternatively if you know the target is unique you can reference the flicker right away with the 0 index. For example:

const myFlicker = Rocket.flicker({
   target: '#flicker'
})[0]; // Reference the first item in the array right away.

myFlicker.stop();

Options

See the different options you have available on initialization.

Name Default Options Description
target .rocket-flicker Set the flicker target elements.
animation transformslide transformslide transitionfade transitionslide Choose the animation type you want.
arrows true true false Arrows are used to navigate back and forth between the flicks.
arrowsConstraint false true false When you get to the end of the flicks pressing the next arrow will navigate you to the beginning again should you have a false constraint. The same applies to the previous arrow.
autoFlick true true false Sets the flick to run automatically. A manual flick resets the delay.
autoFlickDelay 10 Set the delay (in seconds) between each auto flick.
dotAlignment center center left right Set the horizontal alignment of the dot navigation.
dots true true false Dot navigation is used to indicate and navigate between the flicks.
pauseOnHover false true false Pause / Stop the autoFlick on hover. Restart it again when the mouse leaves.
position 1 Set the starting flick.

Defaults

You can also overwrite the module options globally by altering the defaults. To do so reference the defaults object property. For example:

Rocket.defaults.flicker.autoFlickDelay = 20;
Rocket.defaults.flicker.dots = false;

Advanced Example

See an advanced example below with options as per the above.

const myFlicker = Rocket.flicker({
   target: '.flicker-example',
   animation: 'transitionfade',
   autoFlick: false,
   dotAlignment: 'right'
});

Make It Touch Enabled

To make your flicker touch enabled, just included the Hammer library (Rocket Flicker comes with a copy). For example:

<body>
   /* Your content goes here */
   <script src="node_modules/rocket-flicker/js/hammer-v2.0.3.min.js"></script>
   <script src="node_modules/rocket-tools/js/tools.min.js"></script>
   <script src="node_modules/rocket-flicker/js/flicker.min.js"></script>
</body>

Rebuilding Files

In order to rebuild production files you will first need to install the Rocket Command Line Tool. To do so run the following npm command in your terminal. NOTE that this package is installed globally and can take a while as it has quite a few dependencies.

npm install rocket-command -g

Once installed navigate to the Rocket Flicker root and run the following command:

rocket build

The relevant minified CSS and JS will now be rebuilt.

Flickerplate Deprecated

The original library, Flickerplate, has been deprecated. The entire Webplate project is being refactored and rebranded with a new development philosophy. Flickerplate will be maintained only with bug fixes under the flickerplate branch.

Author

Created and maintained by Chris Humboldt
Website: chrishumboldt.com
Twitter: twitter.com/chrishumboldt
GitHub github.com/chrishumboldt

Contributors

dsuket

Copyright and License

Copyright 2018 Rocket Project

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Comments
  • Link to slide

    Link to slide

    Is it possible to have a link that will go to the desired slide.

    For right now there is empty space on the bottom it would be awesome to have a link on the bottom that would link back to a desired slide.

    enhancement 
    opened by nguyenDalex 5
  • Flicker Postion

    Flicker Postion

    Is there a way to change the starting position of the slide. Like on the second slide.

    I believe i altered $flick_position = 1; but not much happened. I'll keep looking for a solution, unless there is one.

    opened by nguyenDalex 5
  • Reset auto flick

    Reset auto flick

    Is there a way to add a timer and a reset location for the slides. I have slides A, B, C. Set to default at slide B. User selects slide A, after say 20 sec, slide slides back to slide B.

    enhancement 
    opened by nguyenDalex 4
  • Dynamically remove flickerplate from webpage

    Dynamically remove flickerplate from webpage

    Hi,

    I am trying to remove the flickerplate element from the web page via JS. Unfortunately after I do that, the flickerAutoFlick method keeps firing producing an error every interval. I may be missing something here but I can't find a way to stop the autoflick before disposing of the flickerplate object?

    Regards Eric

    enhancement 
    opened by EricArc 1
  • Flickerplate fade transition problem

    Flickerplate fade transition problem

    Hi! I am trying to use the jquery-fade transition for my slider and here's what happens: https://www.dropbox.com/s/rnaf8nfssjpyxdi/flickerplate-error.mov?dl=0

    The default transition works fine (the slide) but if I try to use jquery-fade or transition-fade, only the first slide works and the rest show up blank. Also, it seems the DOM structure gets altered somehow since those social icons disappear.

    Any ideas? Thanks! I really need it for the project I'm working on so any help or possible fixes are highly appreciated.

    Cheers! Alexandru Doda

    wontfix 
    opened by altechzilla 1
  • No `flickerplate.css.map` after successful bower install

    No `flickerplate.css.map` after successful bower install

    After I'd bower install flickerplate into my project, I setup the example exactly as written on Flickerplate's Plugin Page, and once I loaded the test the console log shows a 404 on css/flickerplate.css.map.

    You either need to re-process flickerplate.css or add the flickerplate.css.map, please.

    Thank You.

    opened by ChapDaddy65 1
  • link in slideshow http://getwebplate.com/plugins/flickerplate

    link in slideshow http://getwebplate.com/plugins/flickerplate

    My issue now is that I want to put link into this slideshow http://getwebplate.com/plugins/flickerplate. So far Ive discovered is that the responsive menu is above the slideshow and text cannot be selected. I try to use z-index for pulling certain div to top but it seems like that doesn't work out. I really need to make active selectable link in the slideshow but menu is disturbing. How can I fix this please help me

    opened by coderxx13 1
  • Reset timer when user active

    Reset timer when user active

    This is part of my retail store project, when a user taps the screen or drags that counts as active and the timer should be reset to a new timer instead of the default one so that the user can read the slide before it auto rotates.

    This would be a great addition...

    enhancement 
    opened by nguyenDalex 1
  • Dot navigation isn't transitioning correctly

    Dot navigation isn't transitioning correctly

    Hi, Maybe you know how to fix this.. I'm using the slider here: http://schulerbooks.com. It's a Drupal 7 site. When I click on a dot the previous dot stays lit up and I think the slide order is getting messed up a little. I did change one little thing in the js. In the fade transition where it gives the slide opacity I also added z-index in order to be able to wrap the images with special links that go to different pages on the site.

    bug 
    opened by jacobrebh 1
  • problem internet explorer 9

    problem internet explorer 9

    Hallo, I'm a Web Designer and I've a problem in internet explorer 9. The slide doesn't go to the next image. The button changes but the slides are blocked on first. I've also try your plugin in all recent browsers, in pc and mac, in some smartphone and ipad, and it works fine. Just this problem with ie9, anyone can help me to fix?

    Thanks, Stefano

    bug 
    opened by footriver 2
  • Is it possible to change the animation type for the transition between last and first slides?

    Is it possible to change the animation type for the transition between last and first slides?

    I'm using arrow-constraints="false" to allow looping back to first slide from last slide. No matter how i set the flick-animation type, I am getting a different animation type between the last and first slides -- when you click the right arrow on the last slide it shuffles through all of the slides very quickly before it returns to the first slide. I want a smooth transition from last to first, that looks the same as all the other transitions. Example here: http://03be309.netsolhost.com/wordpress/

    Is there a way to change this setting, something I can modify in the .js file? I can't figure out where/how to do this.

    enhancement 
    opened by sarah97302 2
  • Custom auto-flick-delay

    Custom auto-flick-delay

    Hey,

    I tried to do a slideshow where some slides last longer than others but without success.

    I've tried something like this:

    <div class="flicker-example">
        <ul>
            <li data-background="img/flicker-1.jpg">
                <div class="flick-title">Flickerplate Is Working</div>
                <div class="flick-sub-text">Heaven forbid this package you downloaded is broken. That wouldn't be embarrassing at all.</div>
            </li>
            <li data-auto-flick-delay="60" data-background="img/flicker-2.jpg">
                <div class="flick-title">Teste</div>
                <div class="flick-sub-text">Take a look at the extensive documentation to see how you can change the settings in multiple ways.</div>
            </li>
            <li data-background="img/flicker-3.jpg">
                <div class="flick-title">Touch Enabled Through the Hammer.js Library</div>
                <div class="flick-sub-text"><a href="http://hammerjs.github.io/">Hammer.js</a> is a great touch library that has been included as part of the Flickerplate package.</div>
            </li>
        </ul>
    </div>
    

    The "data-auto-flick-delay" tag seems to work only on the main div ("flicker-example"). Is this possible to achieve?

    Thanks.

    bug 
    opened by tiagosantana 1
Releases(v5.0.1)
Owner
Chris Humboldt
Chris Humboldt
Journeys is a django based community-focused website that allows users to bookmark URLs (through chrome extension) and share their journeys through timelines.

Journeys is a django based community-focused website that allows users to bookmark URLs (through chrome extension) and share their journeys through timelines. A timeline is a collection of links that share a common topic or a journey of building and learning something new. Users can create timelines, share them publicly, and explore resources.

Students' Web Committee 14 Jun 13, 2022
Using a RPI 3b+ to create a PT camera accessible through Windows browser and controllable through MQTT

web-camera_PT A Web flask server converts the MJPEG stream from RPI to JPG img using opencv, then display in browser. Controls added to move Camera in

null 11 Dec 20, 2022
🐞 A NodeJS module to access Bugzilla instances through the REST API.

Bugzilla | Typesafe access to Bugzilla's REST API. Very early work in progress, getting info from a bug or searching bugs is the main priority right n

Red Hat - Plumbers - Automation 3 Nov 1, 2022
A Zotero add-on that scans your Markdown reading notes, tags the associated Zotero items, and lets you open notes for the Zotero items in Obsidian.

Zotero Obsidian Citations Adds colored tags to Zotero items that have associated Markdown notes stored in an external folder. Open an associated Markd

Dae 210 Jan 4, 2023
Codism is a Codepen inspired coding playgound that lets you add and modify HTML, CSS and JavaScript

Codism Codism is a Codepen inspired coding playgound that lets you add and modify HTML, CSS and JavaScript to create in order to create cool stuff! Yo

Muhammad Hasnain 5 Nov 24, 2022
Lets you add a character to Hacker News links to add social media and OpenGraph previews for sharing on things like Slack or Twitter.

news.ycombinator1.com Lets you add a character to Hacker News links to add social media and OpenGraph previews for sharing on things like Slack or Dis

Ian Langworth ☠ 38 Sep 18, 2022
A type speed checking website which lets you check your typing speed and shows the real-tme leaderboards with mongodb as DB and express as backend

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Sreehari jayaraj 8 Mar 27, 2022
Inside-out promise; lets you call resolve and reject from outside the Promise constructor function.

Inside-out promise; lets you call resolve and reject from outside the Promise constructor function.

Lily Scott 3 Feb 28, 2022
Plugin that lets you create diagrams from textual representation (aka 'Diagrams as Code') within Logseq

Logseq - Diagrams as Code Plugin that lets you create diagrams (and other visualizations) from textual representation (aka 'Diagrams as Code') within

Nicolai P. Großer 80 Dec 21, 2022
mirrord lets you easily mirror traffic from your production environment to your development environment.

mirrord lets you easily mirror traffic from your Kubernetes cluster to your development environment. It comes as both Visual Studio Code extension and a CLI tool.

MetalBear 2.1k Dec 24, 2022
A website that lets you create legit-looking GitHub links that rickroll the visitor.

microsoftgithub.com, a.k.a. NotHub A website that lets you create legit-looking GitHub links that rickroll the visitor. Usage Just replace github.com

Ash 12 Dec 23, 2022
💻 Countries Web is a web application that lets you view data for all the countries in the world and filter them by country name and continent.

?? Countries Web View Demo This is the Countries Web, a web application that lets you view data for all the countries in the world and filter them by

João Gabriel 5 Jun 23, 2022
ClickCat is a firendly user interface that lets you search,explore and visualize your ClickHouse Data.

ClickCat is a firendly user interface that lets you search,explore and visualize your ClickHouse Data. We provides the following features,you can acce

海博科技 34 Dec 13, 2022
A jQuery plugin that lets you attach callbacks to useful image loading events.

waitForImages Copyright (c) 2011-2018 Alexander Dickson @alexdickson Licensed under the MIT licenses. http://alexanderdickson.com Donate! Overview Pro

Alexander Dickson 1.3k Dec 28, 2022
Hash.js is a 0.5 KB script that lets you in a super simple way manipulate everything behind # in urls.

Hash.js - URL Hash Manipulation Hash.js is a 0.5 KB script that lets you in a super simple way manipulate everything behind # in urls. Tested in lates

Jonny Strömberg 152 Aug 1, 2022
CandyPay SDK lets you effortlessly create NFT minting functions for Candy Machine v2 collections.

@candypay/sdk CandyPay SDK lets you effortlessly create NFT minting functions for Candy Machine v2 collections. Simulate minting transactions for mult

Candy Pay 33 Nov 16, 2022
Piccloud is a full-stack (Angular & Spring Boot) online image clipboard that lets you share images over the internet by generating a unique URL. Others can access the image via this URL.

Piccloud Piccloud is a full-stack application built with Angular & Spring Boot. It is an online image clipboard that lets you share images over the in

Olayinka Atobiloye 3 Dec 15, 2022
An Obsidian plugin that lets you browse the web within Obsidian.

Obsidian Web Browser An Obsidian plugin that allows you to browse the web within Obsidian using v1.0 tabs. The core functionality of the plugin, rende

Dion Tryban 102 Dec 28, 2022