Giter VIP home page Giter VIP logo

slitslider's Introduction

SlitSlider

A responsive slideshow with a twist: the idea is to slice open the current slide when navigating to the next or previous one. Using jQuery and CSS animations we can create unique slide transitions for the content elements.

article on Codrops

demo

Licensed under the MIT License

slitslider's People

Contributors

botelho avatar fbossy avatar jonmifsud avatar maxakawizard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slitslider's Issues

Fade instead of default slit animation

Hi, is there an option to have the slider fade in and out instead of the default animation? I tried giving this option a try (#28) but unfortunately no success. Thanks

fade instead of slide

hello this has perfect functionality for a background image slider. Although my client now wants a fade and not a slit transition. Is it possible to do this with this slider?

adding a navigation bar

Hello, I wonder if it is possible to add a navigation bar instead of arrows or dots. I had several tries but failed.
I guess i have to modify the javascript part, but I am very uncommon with it. I already tried to jump to a specific slide e with a data hash, doesn't work. Any ideas? Thanks in advance for your advice.

custom autoplay interval.

There seems to be no custom autoplay interval setting, in the project we are working on, this is necessary for each slider to have it's own show time.

Are there any chances this will be implemented? Or maybe anyone did that before me and want to navigate me to the right direction on how to make it?

Wonky on iOS8

Love this slider! But it's not working smoothly as it did before after the iOS8 upgrade. =(

Autoplay Issue..

after setting "autoplay" to "true".. it works fine only we stay in the same page!!.. if we moves on to another page & come back again means the autoplay stopped working & navigation dots doesn't work!!..

Kindly solve this issue as soon as possible!!.. My clients are waiting for the fix!!..

P.S. I tested this on "index2.html"..

Simple slide transition?

Hi,

I love your plugin (especially the nav-dots) but I would prefer a simple horizontal transition, how would I go about doing this?

Thanks!

[enhancement] Add missing bower.json.

Hey, maintainer(s) of codrops/SlitSlider!

We at VersionEye are working hard to keep up the quality of the bower's registry.

We just finished our initial analysis of the quality of the Bower.io registry:

7530 - registered packages, 224 of them doesnt exists anymore;

We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).

Sadly, your library codrops/SlitSlider is one of them.

Can you spare 15 minutes to help us to make Bower better?

Just add a new file bower.json and change attributes.

{
  "name": "codrops/SlitSlider",
  "version": "1.0.0",
  "main": "path/to/main.css",
  "description": "please add it",
  "license": "Eclipse",
  "ignore": [
    ".jshintrc",
    "**/*.txt"
  ],
  "dependencies": {
    "<dependency_name>": "<semantic_version>",
    "<dependency_name>": "<Local_folder>",
    "<dependency_name>": "<package>"
  },
  "devDependencies": {
    "<test-framework-name>": "<version>"
  }
}

Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.

NB! Please validate your bower.json with jsonlint before commiting your updates.

Thank you!

Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!

Tag release

It would be very nice to have tagged release - 1.1.0

not work on :

hi,
not work on :iphone , ipad, safari Mountain lion

Work on Firefox mac

Dynamically Add slide

I am trying to build a new editor for the slider where you upload a photo and then set the text on the slide, but the slider does not seem to work with the injected html.

How can I dynamically add a new slide to the slider without breaking it?

Function not defined

I tried implementing the slider into an existing design but the two times i have tried to implement the slider I have received two similar errors. The first error says
TypeError: Modernizr.prefixed is not a function

...s.transEndEventName = this.transEndEventNames[ Modernizr.prefixed( 'transition' ...

The second error says
TypeError: #slider.prefixed is not a function

onBeforeChange : function( slide, pos ) ...

Thanks in advance

Add new page

Hi, can you help me?
I´m trying to add new items but it does´t work.
How can i do that?
Thanks

Add new item

Hello there. I'm nobie at web-programming, but I try hard, so the question is how I can add new Item in that slider.

` $(function() {

			var $items  = $('<div class="sl-slide sl-slide-color-2" data-orientation="horizontal" data-slice1-rotation="-5" data-slice2-rotation="10" data-slice1-scale="2" data-slice2-scale="1"><div class="sl-slide-inner bg-1"><div class="sl-deco" data-icon="t"></div><h2>some text</h2><blockquote><p>bla bla</p><cite>Margi Clarke</cite></blockquote></div></div>');
			ss.add($items);
			
			var Page = (function() {

				var $navArrows = $( '#nav-arrows' ),
					$nav = $( '#nav-dots > span' ),
					slitslider = $( '#slider' ).slitslider( {
						onBeforeChange : function( slide, pos ) {

							$nav.removeClass( 'nav-dot-current' );
							$nav.eq( pos ).addClass( 'nav-dot-current' );

						}
					} ),

					init = function() {

						initEvents();
						
					},
					initEvents = function() {


						// add navigation events
						$navArrows.children( ':last' ).on( 'click', function() {

							slitslider.next();
							return false;

						} );

						$navArrows.children( ':first' ).on( 'click', function() {
							
							slitslider.previous();
							return false;

						} );

						$nav.each( function( i ) {
						
							$( this ).on( 'click', function( event ) {
								
								var $dot = $( this );
								
								if( !slitslider.isActive() ) {

									$nav.removeClass( 'nav-dot-current' );
									$dot.addClass( 'nav-dot-current' );
								
								}
								
								slitslider.jump( i + 1 );
								return false;
							
							} );
							
						} );

					};

					return { init : init };

			})();

			Page.init();
			

			/**
			 * Notes: 
			 * 
			 * example how to add items:
			 */

			/*
			
			# var $items  = $('<div class="sl-slide sl-slide-color-2" data-orientation="horizontal" data-slice1-rotation="-5" data-slice2-rotation="10" data-slice1-scale="2" data-slice2-scale="1"><div class="sl-slide-inner bg-1"><div class="sl-deco" data-icon="t"></div><h2>some text</h2><blockquote><p>bla bla</p><cite>Margi Clarke</cite></blockquote></div></div>');
			
			// call the plugin's add method
			# ss.add($items);

			*/`

Still don't get where I should write this code....

Transparent Images supported (?)

I'm working with transparent images.

During translation effect the splitted image lose transparent value and became a white-background image.

I set optOpacity value both 0 or 1 but doesn't change.

Are transparent images supported?

thanks

Not autoplaying

Hello. Probably my mistake but my slider that is based on index2.html does not autoplay.

$(function() {
var Page = (function() {
var $nav = $( '#nav-dots > span' ),
slitslider = $( '#slider' ).slitslider( {
autoSlide: true,
autoSlideTimeout: 100,
onBeforeChange : function( slide, pos ) {
$nav.removeClass( 'nav-dot-current' );
$nav.eq( pos ).addClass( 'nav-dot-current' );
}
} ),
init = function() {
initEvents();
},
initEvents = function() {
$nav.each( function( i ) {
$( this ).on( 'click', function( event ) {
var $dot = $( this );
if( !slitslider.isActive() ) {
$nav.removeClass( 'nav-dot-current' );
$dot.addClass( 'nav-dot-current' );
}
slitslider.jump( i + 1 );
return false;
} );
} );
};
return { init : init };
})();
Page.init();
});

$( document ).ready(function() {
$('#slider').slideDown("slow");
});

onAfterChange parameter returns the previous element

I'm trying to get the actual chosen element when switching the slider from one to the next element.

this is my onAfterChange. I thought, when I call this, slide returns the new element, but it always returns the old one.

This is my Page-object:

var Page = (function () {

var $navArrows = $('#nav-arrows'),
    $nav = $('#nav-dots > span'),
slitslider = $('#slider').slitslider({
    onBeforeChange: function (slide, pos) {

        $nav.removeClass('nav-dot-current');
        $nav.eq(pos).addClass('nav-dot-current');

    },
    onAfterChange: function (slide, pos) {
        var id = $(slide).attr('id');
        alert(id);
        return true;
    }
}),

but when I want to switch to the next one, the alert always prints the id of the previous element instead of the current one.
Funny is, when I switch back to the previous element, the alert prints the correct id. The pos-parameter is always correct.

Any idea?

content is going behind SlitSlider. Please help

                <div class="sl-slide bg-1" data-orientation="horizontal" data-slice1-rotation="-25" data-slice2-rotation="-25" data-slice1-scale="2" data-slice2-scale="2">
                    <div class="sl-slide-inner">
                        <div class="deco" data-icon="H"></div>
                        <h2>A bene placito</h2>
                        <blockquote><p>You have just dined, and however scrupulously the slaughterhouse is concealed in the graceful distance of miles, there is complicity.</p><cite>Ralph Waldo Emerson</cite></blockquote>
                    </div>
                </div>

                <div class="sl-slide bg-2" data-orientation="vertical" data-slice1-rotation="10" data-slice2-rotation="-15" data-slice1-scale="1.5" data-slice2-scale="1.5">
                    <div class="sl-slide-inner">
                        <div class="deco" data-icon="q"></div>
                        <h2>Regula aurea</h2>
                        <blockquote><p>Until he extends the circle of his compassion to all living things, man will not himself find peace.</p><cite>Albert Schweitzer</cite></blockquote>
                    </div>
                </div>

                <div class="sl-slide bg-3" data-orientation="horizontal" data-slice1-rotation="3" data-slice2-rotation="3" data-slice1-scale="2" data-slice2-scale="1">
                    <div class="sl-slide-inner">
                        <div class="deco" data-icon="O"></div>
                        <h2>Dum spiro, spero</h2>
                        <blockquote><p>Thousands of people who say they 'love' animals sit down once or twice a day to enjoy the flesh of creatures who have been utterly deprived of everything that could make their lives worth living and who endured the awful suffering and the terror of the abattoirs.</p><cite>Dame Jane Morris Goodall</cite></blockquote>
                    </div>
                </div>

                <div class="sl-slide bg-4" data-orientation="vertical" data-slice1-rotation="-5" data-slice2-rotation="25" data-slice1-scale="2" data-slice2-scale="1">
                    <div class="sl-slide-inner">
                        <div class="deco" data-icon="I"></div>
                        <h2>Donna nobis pacem</h2>
                        <blockquote><p>The human body has no more need for cows' milk than it does for dogs' milk, horses' milk, or giraffes' milk.</p><cite>Michael Klaper M.D.</cite></blockquote>
                    </div>
                </div>

                <div class="sl-slide bg-5" data-orientation="horizontal" data-slice1-rotation="-5" data-slice2-rotation="10" data-slice1-scale="2" data-slice2-scale="1">
                    <div class="sl-slide-inner">
                        <div class="deco" data-icon="t"></div>
                        <h2>Acta Non Verba</h2>
                        <blockquote><p>I think if you want to eat more meat you should kill it yourself and eat it raw so that you are not blinded by the hypocrisy of having it processed for you.</p><cite>Margi Clarke</cite></blockquote>
                    </div>
                </div>
            </div><!-- /sl-slider -->

            <nav id="nav-arrows" class="nav-arrows">
                <span class="nav-arrow-prev">Previous</span>
                <span class="nav-arrow-next">Next</span>
            </nav>

            <nav id="nav-dots" class="nav-dots">
                <span class="nav-dot-current"></span>
                <span></span>
                <span></span>
                <span></span>
                <span></span>
            </nav>
        </div><!-- /slider-wrapper -->
    </div>
    <h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1><h1>asdasdas dkasjdhaskld alskdj ahlskdj alsdk ask</h1></body>

navigation issue

Hello,

I've implemented this great slider into Magento. I've tested it with jQuery 1.7.2 also, and it worked. However, in Magento the navigation does not work, but autoplay does. Any ideas on what the issue could be? No errors in console...

This is the site: http://dev.imok.ro/winteroutlet/

Thanks!

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.