Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test6-03 #1

Open
wants to merge 139 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
7cd17ba
Added the autoplay functionality.
Mar 5, 2012
2ed122e
Removing an unneccessary variable, .replace() call, and giving myself…
Mar 5, 2012
cfb0f5e
Added better defaults, and added an autoplay option.
Mar 5, 2012
53e6451
whoops, I'm an idiot.
Mar 6, 2012
bc1cab1
Fixing the animations.
Mar 6, 2012
6bdf9b4
Fixing that crazy back button shizzle.
Mar 6, 2012
7762f72
Fixed me being an utter twonk.
Mar 6, 2012
8bccfb3
Added easing support.
Mar 6, 2012
b71d357
Bumped the version number.
Mar 6, 2012
2dfd28e
Using "left" instead of "margin-left" for performance reasons. Yay, p…
Mar 6, 2012
a7a6342
Added a minified version for shits and giggles.
Mar 6, 2012
5e39e2e
Fixed a whole buncha random crap.
Mar 7, 2012
ed393f0
Improved performance and added the minified version.
Mar 7, 2012
5633529
Bumped version number again.
Mar 7, 2012
16cb208
Updated docs.
Mar 7, 2012
904d16c
Optimisifying.
Mar 7, 2012
aee8fa8
Updatin’ the readme.
Mar 7, 2012
f87f18b
Added jQswipe support.
Mar 8, 2012
76b503e
[fix] wrong width calculated from <ul> not from <li>
vladalive Mar 30, 2012
ef4bc25
Merge pull request #5 from vladalive/patch-1
Mar 31, 2012
8168aac
Append arrows to 'me' instead of 'me.parent()'
daneden May 23, 2012
8cdc45e
Append arrows to 'c' instead of 'c.parent()'
daneden May 23, 2012
693e377
List styles? Where we're going, we don't need list styles.
daneden May 23, 2012
0ead348
Merge pull request #6 from daneden/master
May 23, 2012
158e3a0
remove ALL the files
Feb 1, 2013
b22b217
building the framework
Feb 1, 2013
7f843a4
testing
Feb 1, 2013
c9dda46
got it working but the slides aren't working separately wtf
Feb 1, 2013
37cc627
there we go multiple slides bitch
Feb 1, 2013
fa09f8f
and it works with responsive, i fucking rule
Feb 1, 2013
dbe7a2e
autostopstartbitch
Feb 1, 2013
4527356
whostolemyspacebar
Feb 1, 2013
3290086
works with padding as long as you have border-box on
Feb 1, 2013
d519155
keyboard support
Feb 1, 2013
7c5efa7
so lets get percentage widths working on the container eh?
Feb 1, 2013
112e08c
I AM THE GREETEST
Feb 1, 2013
e467e12
TO INFINITY AND BEYOND
Feb 1, 2013
d6e2051
fixin stuff
Feb 1, 2013
dc06952
added arrows
Feb 1, 2013
f6b7d92
there we go
Feb 2, 2013
089b2af
Merge pull request #8 from idiot/dev
Feb 2, 2013
a6c7a37
/packer/ compresses better
Feb 2, 2013
39dfe94
fucking zepto, being all not jquery and shit
Feb 4, 2013
c28d40f
wut
Mar 6, 2013
b296f27
Merge branch 'master' of https://github.com/idiot/unslider
Mar 6, 2013
2bf2984
adding site because fuck tiny repos
Mar 9, 2013
33c672b
added mobile support
Mar 12, 2013
fa346f4
sudo update
Mar 16, 2013
40d659c
swipe support
Mar 16, 2013
f9b29f6
MOAR DOCS
Mar 16, 2013
6f80176
so I can link to shit
Mar 16, 2013
9e4574d
Typo fixed.
rish Mar 16, 2013
e01f357
Merge pull request #15 from rish/patch-1
Mar 16, 2013
f53efe9
oops responsive
Mar 16, 2013
8d54b85
fixin' them dots
Mar 16, 2013
d765c16
bloody safari
Mar 17, 2013
4e51f53
updated the demo CSS
Mar 19, 2013
41d2f94
zero-indexed dots don't make sense
Mar 19, 2013
a39d12d
fix for fluid resizing
Mar 21, 2013
d487391
prev/next docs
Mar 21, 2013
5e16744
added minified unslider
Mar 21, 2013
9685f25
minified, not minified - same thing, right?
Mar 21, 2013
efb0ac9
typo, fixes issue #21
Mar 23, 2013
974e722
minifed js
Mar 23, 2013
2d6dbba
update
damirfoy Mar 23, 2013
18b14e1
update #2
damirfoy Mar 24, 2013
2a00888
update #2 min
damirfoy Mar 24, 2013
7908e12
update #2 min
damirfoy Mar 24, 2013
1a25b3e
update #2 optimized
damirfoy Mar 24, 2013
9ab1732
Merge pull request #22 from damirfoy/master
Mar 24, 2013
6e5f58a
invoke fix, new options
damirfoy Mar 25, 2013
81c646b
Drag and swipe
damirfoy Mar 26, 2013
4d4c0dd
Drag and swipe min
damirfoy Mar 26, 2013
67bc825
Merge pull request #26 from damirfoy/master
Mar 26, 2013
3eb2f13
Optimization
damirfoy Mar 27, 2013
7d518b3
use: and from: options
damirfoy Mar 27, 2013
9496e74
min
damirfoy Mar 27, 2013
256bc57
min
damirfoy Mar 27, 2013
a053220
comments
damirfoy Mar 27, 2013
a49a933
options comments
damirfoy Mar 27, 2013
fd3347e
zepto swipe support
damirfoy Mar 28, 2013
95f6711
zepto swipe min
damirfoy Mar 28, 2013
5895260
Merge pull request #27 from damirfoy/master
Mar 28, 2013
0a90605
Fixed fluid unslider resizing.
Turtleguyy Mar 29, 2013
cba1184
Merge pull request #30 from turtleguyy/master
Mar 29, 2013
85318d9
update
damirfoy Apr 3, 2013
7e3de5a
Swipe fix
damirfoy Apr 3, 2013
2c61611
fix
damirfoy Apr 3, 2013
ced5a92
merge
damirfoy Apr 3, 2013
cdea3b3
min
damirfoy Apr 10, 2013
db8d9d3
make ul li configurable
Apr 11, 2013
7d718ee
fixes wrong direction on swipe events
bytehead Apr 11, 2013
6c2d030
Merge pull request #35 from bytehead/master
damirfoy Apr 11, 2013
a76c12a
swipe min
damirfoy Apr 11, 2013
0cf7862
renamed options for container and items
Apr 11, 2013
075574c
Merge pull request #34 from Flask/master
damirfoy Apr 11, 2013
baae544
minified
damirfoy Apr 16, 2013
f32eefd
Avoid jQuery pseudo-selectors for better performance
i-like-robots May 9, 2013
6acd330
Update minified file with f32eefdc5a72ff195c5cefca3df41b8985275aca
i-like-robots May 9, 2013
2d1570c
Merge pull request #43 from i-like-robots/master
May 9, 2013
0237ffb
Added easing function option.
jacobbuck Jul 15, 2013
bfb3c7a
Merge pull request #72 from jacobbuck/master
Jul 24, 2013
9cc66e4
start() function does not exists
jdeniau Oct 22, 2013
a0f9f4f
Update unslider.js
multiwebinc Oct 24, 2013
f88e6e3
Update unslider.js
multiwebinc Oct 26, 2013
8d0bd69
Merge pull request #103 from multiwebinc/patch-2
Nov 11, 2013
e3b0c64
Merge pull request #100 from jdeniau/patch-1
Nov 11, 2013
ca8bdf7
Merge pull request #102 from multiwebinc/patch-1
Nov 11, 2013
3d9354e
adding starting function and argument with the target and current ite…
ShamoX Dec 1, 2013
095a393
adding version and a new contributor
ShamoX Dec 1, 2013
972231d
apply yui-compressor on js source
ShamoX Dec 1, 2013
8f4f5a8
Merge branch 'release/v1.0.0'
ShamoX Dec 1, 2013
53d54f7
Merge pull request #110 from Gnuside/master
Dec 5, 2013
1ee7925
Added autoplay config option
YanikCeulemans Dec 7, 2013
fe5bd3c
converted spaces to tabs
YanikCeulemans Dec 7, 2013
c5d7403
converted more spaces to tabs
YanikCeulemans Dec 7, 2013
2634b4f
Merge pull request #113 from Sindrave/master
Dec 17, 2013
d46f60e
add bower support
Jan 12, 2014
70dbd20
added ignore
Jan 15, 2014
b47ad25
No autoplay explanation
Feb 21, 2014
a2778aa
Merge pull request #133 from dtorras/master
Feb 24, 2014
1580c75
Merge pull request #126 from grounded042/master
Feb 24, 2014
2ada4ca
To fix error in Uglifier - replaced arrow characters with html entiti…
iconincRhys Mar 14, 2014
b47f18c
made list items fluid if fluid option true
iconincRhys Mar 14, 2014
f0e181a
fix display:inline-block on IE6 and IE7
hho2002 Apr 1, 2014
bcf8deb
Recalculate li width for fluid designs when window is resized
Apr 29, 2014
7f688cf
remove Swipe, add Move Support.
page7 Apr 30, 2014
ccebf3e
Merge pull request #155 from callmehippy/master
May 12, 2014
9cd3c6b
Merge pull request #156 from page7/master
May 22, 2014
77406ef
Merge pull request #142 from rhysburnie/master
May 22, 2014
832e791
Merge pull request #147 from hho2002/fix-inline-block
May 22, 2014
efc180b
Update site index.html
nunopolonia Jul 17, 2014
6b51392
This fixes #181 which makes scrolling smooth and responsive
Frazer Jul 30, 2014
688f2a8
Easily display the Licensing
cliffordp Aug 21, 2014
ff1c949
Merge pull request #193 from cliffordp/patch-1
Sep 5, 2014
f5a78d3
Merge pull request #180 from nunopolonia/patch-1
Sep 5, 2014
ddba865
Merge pull request #186 from Frazer/issue181
Sep 5, 2014
2f8d992
use triple equals & clean up some comparisons
kelvintaywl Apr 11, 2015
8ae045e
Merge pull request #245 from kelvintaywl/master
Apr 11, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .gitignore
100644 → 100755
Empty file.
14 changes: 14 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "unslider",
"version": "0.0.0",
"main": "src/unslider.min.js",
"license": "MIT",
"dependencies": {
"jquery": "latest"
},
"ignore" : [
"site/",
"readme.md",
".gitignore"
]
}
52 changes: 2 additions & 50 deletions readme.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,51 +1,3 @@
# Unslider
### A jQuery slider that just slides.
<a href="http://unslider.com">Visit the site</a>.

If you want to have a quick, lightweight slider, with just the arrows and no fancy effects, then you'll love Unslider. Weighing in at 3kb uncompressed, and 1.6kb compressed, it's an incredibly lightweight solution.

## Features
* Slides a list
* Supports any HTML content (within a list item)
* Keyboard support

That's it!

## Quickstart
To begin using Unslider, just include the files, and create a `div` with an unordered list (`ul`) inside.

Pretty straightforward, and nice and semantic. Lovely. Now, we need a touch of CSS as well:
```css
.unslider { overflow: hidden; }
.unslider li { float: left; }
```

_This is the same as the contents for unslider.css, so if you're including that file, don't add this CSS._

Now that it's all set up, you just need to call the `unslider` method, with any options. They're optional, though, so you don't need to

```javascript
// Vanilla install
$('#slider').unslider();

// And any options
$('#slider').unslider({
// Options go here.
});
```

## Options
It's also got a few options:

```javascript
{
activeClass: 'active',
arrows: true, // If false, just autoplay

// Speeds + timing
speed: 250,
delay: 2000,

// Callbacks
afterSlide: function() {} // Called after a slide has occured.
}
```
License: <a href="http://www.wtfpl.net/"><img src="http://www.wtfpl.net/wp-content/uploads/2012/12/wtfpl-badge-4.png" width="80" height="15" alt="WTFPL" /></a>
Binary file added site/img/icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/img/icons@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/img/shop.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/img/subway.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/img/sunset.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/img/wood.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
258 changes: 258 additions & 0 deletions site/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Unslider &mdash; the super-tiny jQuery slider</title>

<link rel="stylesheet" href="style.css">

<meta name="viewport" content="width=device-width">

<script src="//use.typekit.net/vgf3zbf.js"></script>
<script>try{Typekit.load();}catch(e){}</script>
</head>
<body>
<img id="logo" src="img/logo.png" alt="Unslider logo" width="34" height="27">

<div class="banner">
<ul>
<li style="background-image: url('img/sunset.jpg');">
<div class="inner">
<h1>The jQuery slider that just slides.</h1>
<p>No fancy effects or unnecessary markup, and it’s less than 3kb.</p>

<a class="btn" href="#download">Download</a>
</div>
</li>

<li style="background-image: url('img/wood.jpg');">
<div class="inner">
<h1>Fluid, flexible, fantastically minimal.</h1>
<p>Use any HTML in your slides, extend with CSS. You have full control.</p>

<a class="btn" href="#download">Download</a>
</div>
</li>

<li style="background-image: url('img/subway.jpg');">
<div class="inner">
<h1>Open-source.</h1>
<p>Everything to do with Unslider is hosted on GitHub.</p>

<a class="btn" href="//github.com/idiot/unslider">Contribute</a>
</div>
</li>

<li style="background-image: url('img/shop.jpg');">
<div class="inner">
<h1>Uh, that’s about it.</h1>
<p>I just wanted to show you another slide.</p>

<a class="btn" href="#download">Download</a>
</div>
</li>
</ul>
</div>

<div class="features">
<ul class="wrap">
<li class="browser">
<b>Cross-browser happy</b>
<p>Unslider’s been tested in all the latest browsers, and it falls back magnificently for the not-so-latest ones.</p>
</li>

<li class="keyboard">
<b>Keyboard support</b>
<p>If you want to, you can add keyboard arrow support. Try it: hit left and right arrow keys.</p>
</li>

<li class="height">
<b>Adjusts for height</b>
<p>Not all slides are created equal, and Unslider knows it. It’ll stylishly transition heights with no extra code.</p>
</li>

<li class="responsive">
<b>Yep, it’s responsive</b>
<p>You’ll be hard pressed to find a site that’s not responsive these days. Unslider’s got your back.</p>
</li>
</ul>
</div>

<div id="howto" class="how wrap">
<h2>How to use Unslider</h2>

<ol>
<li>
<div>
<h3>Include jQuery and Unslider</h3>
<p>To use Unslider, you’ll need to make sure both the Unslider and jQuery scripts are included. If you’ve already got jQuery (you can test by opening your JavaScript console and typing <code>!!window.jQuery</code> — if it says <code>true</code>, you have jQuery), you don’t need to add the first line.</p>
</div>

<pre>&lt;script src="//code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
&lt;script src="//unslider.com/unslider.js"&gt;&lt;/script&gt;
</pre>
</li>

<li>
<div>
<h3>Ready your HTML</h3>
<p>Unslider doesn’t need any really awkward markup. In fact, all you need is a <code>div</code> and an unordered list. An example of some Unslider-friendly HTML is on the right.</p>
<p>You can add as many slides as you want: the example on the right just has three for the sake of brevity, but Unslider won’t work properly with one slide (but then it’s just a box).</p>
</div>

<pre>&lt;div class=&quot;banner&quot;&gt;
&lt;ul&gt;
&lt;li&gt;This is a slide.&lt;/li&gt;
&lt;li&gt;This is another slide.&lt;/li&gt;
&lt;li&gt;This is a final slide.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</pre>
</li>

<li>
<div>
<h3>Make it pretty</h3>
<p>You can change, add, and remove as much CSS per slide as you want, but there <i>is</i> a barebones style required by Unslider. It’s on the right (change the class name where .banner is the name of your slider).</p>
</div>

<pre>.banner { position: relative; overflow: auto; }
.banner li { list-style: none; }
.banner ul li { float: left; }</pre>
</li>

<li>
<div>
<h3>Plug it all together</h3>
<p>We’ve been through so much together, and I’m pleased to say the finish line is near. Our journey is almost over, just one more thing left to do. The JavaScript is on the right (make sure to put it in a <code>script</code> tag, and change <code>.banner</code> to whatever your slider’s element is).</p>
</div>

<pre>$(function() {
$('.banner').unslider();
});</pre>
</li>
</ol>
</div>

<div id="options" class="options">
<div class="wrap">
<h2>Options</h2>
<p>Although it’s lightweight, Unslider comes with a range of options to customise your slider. Here’s the default options provided. You can add, remove, or completely skip out the options object. It’s up to you.</p>

<pre>$('.banner').unslider({
speed: 500, <span>// The speed to animate each slide (in milliseconds)</span>
delay: 3000, <span>// The delay between slide animations (in milliseconds), false for no autoplay</span>
complete: function() {}, <span>// A function that gets called after every slide animation</span>
keys: true, <span>// Enable keyboard (left, right) arrow shortcuts</span>
dots: true, <span>// Display dot navigation</span>
fluid: false <span>// Support responsive design. May break non-responsive designs</span>
});</pre>
<br><br><br>
<h2 id="touch">Touch support</h2>
<p>If you want to add mobile/touch/swipe/whatever support to Unslider, you’ll need to include the <a href="http://stephband.info/jquery.event.swipe/">jQuery.event.swipe</a> plugin, then it’ll work out the box. Easy!</p>

<br><br><br>

<h2 id="prev-next">Adding previous/next links</h2>
<p>A feature that’s often requested in Unslider, but isn’t included in-the-box, is previous/next links. Luckily, they’re easy enough to add with a little script, which utilises Unslider’s <a href="#methods">methods</a>.</p>

<pre><span>&lt;!-- The HTML --&gt;</span>
&lt;a href="#" class="unslider-arrow prev"&gt;Previous slide&lt;/a&gt;
&lt;a href="#" class="unslider-arrow next"&gt;Next slide&lt;/a&gt;

<span>&lt;!-- And the JavaScript --&gt;</span>
&lt;script&gt;
var unslider = $('.banner').unslider();

$('.unslider-arrow').click(function() {
var fn = this.className.split(' ')[1];

<span>// Either do unslider.data('unslider').next() or .prev() depending on the className</span>
unslider.data('unslider')[fn]();
});
&lt;/script&gt;
</pre>

<br><br><br>
<h2 id="methods">Accessing Unslider properties</h2>
<p>Using jQuery’s wonderful <code>data</code> method, you can access and manually override any methods. Here’s a list of what you can do:</p>

<pre>var slidey = $('.banner').unslider(),
data = slidey.data('unslider');

<span>// Start Unslider</span>
data.play();

<span>// Pause Unslider</span>
data.stop();

<span>// Move to a slide index, with optional callback</span>
data.to(2, function() {});
<span>// data.to(0);</span>

<span>// Manually enable keyboard shortcuts</span>
data.keys();

<span>// Move to the next slide (or the first slide if there isn't one)</span>
data.next();

<span>// Move to the previous slide (or the last slide if there isn't one)</span>
data.prev();

<span>// Append the navigation dots manually</span>
data.dots();</pre>
</div>
</div>

<div id="download" class="wrap footer">
<a class="btn" href="/unslider.min.js">Download <span>minified (2.6k)</span></a>
<a class="btn" href="/unslider.js">Download <span>source (5.1k)</span></a>
<br>
<a href="//twitter.com/idiot">@idiot</a> &mdash; <a href="//github.com/idiot/unslider">Github</a>
</div>


<script src="//code.jquery.com/jquery-latest.min.js"></script>

<script src="//stephband.info/jquery.event.move/js/jquery.event.move.js"></script>
<script src="//stephband.info/jquery.event.swipe/js/jquery.event.swipe.js"></script>

<script src="//unslider.com/unslider.min.js"></script>
<script>
if(window.chrome) {
$('.banner li').css('background-size', '100% 100%');
}

$('.banner').unslider({
arrows: true,
fluid: true,
dots: true
});

// Find any element starting with a # in the URL
// And listen to any click events it fires
$('a[href^="#"]').click(function() {
// Find the target element
var target = $($(this).attr('href'));

// And get its position
var pos = target.offset(); // fallback to scrolling to top || {left: 0, top: 0};

// jQuery will return false if there's no element
// and your code will throw errors if it tries to do .offset().left;
if(pos) {
// Scroll the page
$('html, body').animate({
scrollTop: pos.top,
scrollLeft: pos.left
}, 1000);
}

// Don't let them visit the url, we'll scroll you there
return false;
});

var GoSquared = {acct: 'GSN-396664-U'};
</script>
<script src="//d1l6p2sc9645hc.cloudfront.net/tracker.js"></script>
</body>
</html>
Loading