Skip to content

Commit 2f309ee

Browse files
committed
Added option to allow for keyboard events to change slides.
1 parent bcf1cd6 commit 2f309ee

File tree

15 files changed

+85
-17
lines changed

15 files changed

+85
-17
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# smartscroll
22

3-
smartscroll is a tiny (1665b minfied + gzipped) jQuery plugin that has these *independent* features:
3+
smartscroll is a tiny (1834b minfied + gzipped) jQuery plugin that has these *independent* features:
44

55
1. Section scrolling - Scrolljacking
66
2. Auto-hash - Updates the URL hash based on current position on page
@@ -77,6 +77,7 @@ Structure your HTML like so (default options included)
7777
* `eventEmitter` - (Object) If you pass in an [EventEmitter](https://github.com/Olical/EventEmitter) object, autoHashing will be much more efficient. You can also listen to the scroll events this way. Defaults to `null`.
7878
* `ie8` - If you need to support Internet Explorer 8, change this to `true`. Defaults to `false`.
7979
* `bindSwipe` - (Boolean) Allow for listening of swipe events. Requires EventEmitter. Defaults to `true`
80+
* `bindKeyboard` - (Boolean) Allow for keyboard events (up and down arrows) to control slides. Defaults to `true`
8081

8182
### Events
8283

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"smartscroll.js",
55
"sass/smartscroll.scss"
66
],
7-
"version": "2.3.1",
7+
"version": "2.4.0",
88
"homepage": "https://github.com/d4nyll/smartscroll",
99
"repository": {
1010
"type": "git",

examples/auto-hash/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="section" data-hash="a">
1313
<div>
1414
<h1>smartscroll - Auto-Hash</h1>
15-
<p>A tiny (1665b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
15+
<p>A tiny (1834b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
1616
<p>See it on <a href="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <a href="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
1717
<p>Try out other examples!</p>
1818
<ul>

examples/different-heights-hybrid-scroll/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<div class="header">
1212
<div>
1313
<h1>smartscroll - Different Heights &amp; Hybrid Scroll</h1>
14-
<p>A tiny (1665b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
14+
<p>A tiny (1834b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
1515
<p>See it on <a href="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <a href="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
1616
<p>Try out other examples!</p>
1717
<ul>

examples/different-heights-inner-section-scroll/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="section" data-hash="a">
1313
<div>
1414
<h1>smartscroll - Different Heights</h1>
15-
<p>A tiny (1665b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
15+
<p>A tiny (1834b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
1616
<p>See it on <a href="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <a href="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
1717
<p>Try out other examples!</p>
1818
<ul>

examples/different-heights/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="section" data-hash="a">
1313
<div>
1414
<h1>smartscroll - Different Heights</h1>
15-
<p>A tiny (1665b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
15+
<p>A tiny (1834b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
1616
<p>See it on <a href="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <a href="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
1717
<p>Try out other examples!</p>
1818
<ul>

examples/hybrid-scroll/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<div class="header">
1212
<div>
1313
<h1>smartscroll - Hybrid Scroll</h1>
14-
<p>A tiny (1665b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
14+
<p>A tiny (1834b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
1515
<p>See it on <a href="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <a href="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
1616
<p>Try out other examples!</p>
1717
<ul>

examples/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<div class="header">
1212
<div>
1313
<h1>smartscroll</h1>
14-
<p>A tiny (1665b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
14+
<p>A tiny (1834b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
1515
<p>See it on <a href="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <a href="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
1616
<p>Try out other examples!</p>
1717
<ul>

examples/keep-history/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="section" data-hash="a">
1313
<div>
1414
<h1>smartscroll - Keep History</h1>
15-
<p>A tiny (1665b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
15+
<p>A tiny (1834b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
1616
<p>See it on <a href="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <a href="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
1717
<p>Try out other examples!</p>
1818
<ul>

examples/permalink/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="section" data-hash="a">
1313
<div>
1414
<h1>smartscroll - Permalink</h1>
15-
<p>A tiny (1665b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
15+
<p>A tiny (1834b minfied + gzipped) jQuery plugin for scrolljacking and auto-hashing</p>
1616
<p>See it on <a href="https://github.com/d4nyll/smartscroll" target="_blank">GitHub</a>, or see some <a href="http://blog.danyll.com/smartscroll-jquery-scrolljacking-plugin/" target="_blank">comparisons</a></p>
1717
<p>Try out other examples!</p>
1818
<ul>

0 commit comments

Comments
 (0)