Skip to content

Commit f0436d5

Browse files
committed
Bug with using multiple scrollers with buttons fixed
1 parent 4bc81a5 commit f0436d5

File tree

3 files changed

+53
-6
lines changed

3 files changed

+53
-6
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
jQuery simplyScroll 2
22
=====================
33

4-
2.0.1 1/02/12. Created by Will Kelly [@logicbox](http://twitter.com/logicbox)
4+
2.0.2 6/02/12. Created by Will Kelly [@logicbox](http://twitter.com/logicbox)
55

66
simplyScroll is a jQuery plugin that can animate (scroll) a set of elements either automatically or manually,
77
horizontally or vertically, forwards or backwards. This plugin can be performance intensive, so speed and
8-
framerate are fully configureable to accomodate lower spec systems.
8+
framerate are fully configureable to accommodate lower spec systems.
99

1010
## New in V2 ##
1111

1212
* Auto-scroll in either direction
1313
* RTL support, normalises browser RTL scroll implementations
1414
* Touch support
1515
* Now supports unequal sized elements in loop mode
16+
* Pause/resume
1617

1718
## Features ##
1819

jquery.simplyscroll.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Dual licensed under the MIT and GPL licenses.
1010
*
11-
* Version: 2.0.1 Last revised: 1/02/2012
11+
* Version: 2.0.2 Last revised: 6/02/2012
1212
*
1313
*/
1414

@@ -75,9 +75,6 @@ $.simplyScroll = function(el,options) {
7575
this.$list.parent().parent()
7676
.prepend('<div class="simply-scroll-forward"></div>')
7777
.prepend('<div class="simply-scroll-back"></div>');
78-
79-
this.$btnBack = $('.simply-scroll-back',this.$container);
80-
this.$btnForward = $('.simply-scroll-forward',this.$container);
8178
} else {
8279
if (this.o.pauseButton) {
8380
this.$list.parent().parent()
@@ -129,6 +126,8 @@ $.simplyScroll.fn.extend({
129126
this.$items = this.$list.children();
130127
this.$clip = this.$list.parent(); //this is the element that scrolls
131128
this.$container = this.$clip.parent();
129+
this.$btnBack = $('.simply-scroll-back',this.$container);
130+
this.$btnForward = $('.simply-scroll-forward',this.$container);
132131

133132
if (!this.isHorizontal) {
134133
this.itemMax = this.$items.eq(0).outerHeight(true);

test/test_vert_manual_multi.html

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<title>jQuery simplyScroll - Logicbox</title>
6+
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js">
7+
</script>
8+
<!--<script type="text/javascript" src="/js/common.js"></script>-->
9+
<script type="text/javascript" src="../jquery.simplyscroll.js"></script>
10+
<link rel="stylesheet" href="../jquery.simplyscroll.css" media="all" type="text/css">
11+
<script type="text/javascript">
12+
(function($) {
13+
$(function() {
14+
$(".scroller").simplyScroll({
15+
customClass:'vert',
16+
orientation:'vertical',
17+
auto: false,
18+
speed: 10
19+
});
20+
});
21+
})(jQuery);
22+
</script>
23+
</head>
24+
25+
<body>
26+
27+
<ul class="scroller">
28+
<li><img src="http://logicbox.net/jquery/simplyscroll/assets/20080608_9N3H5GYL_tb.jpg" width="290" height="200" alt="Firehouse"></li>
29+
<li><img src="http://logicbox.net/jquery/simplyscroll/assets/20080513_4D3SD1BQ_tb.jpg" width="290" height="200" alt="Chloe nightclub"></li>
30+
<li><img src="http://logicbox.net/jquery/simplyscroll/assets/20080513_VPJWVQRW_tb.jpg" width="290" height="200" alt="Firehouse bar"></li>
31+
<li><img src="http://logicbox.net/jquery/simplyscroll/assets/20080514_B1YJ08B6_tb.jpg" width="290" height="200" alt="Firehouse chloe club fishtank"></li>
32+
<li><img src="http://logicbox.net/jquery/simplyscroll/assets/20080514_JYW68XPT_tb.jpg" width="290" height="200" alt="Firehouse restaurant"></li>
33+
<li><img src="http://logicbox.net/jquery/simplyscroll/assets/20080608_38CG51J2_tb.jpg" width="290" height="200" alt="Firehouse"></li>
34+
</ul>
35+
36+
<ul class="scroller">
37+
<li><img src="http://logicbox.net/jquery/simplyscroll/assets/20080608_9N3H5GYL_tb.jpg" width="290" height="200" alt="Firehouse"></li>
38+
<li><img src="http://logicbox.net/jquery/simplyscroll/assets/20080513_4D3SD1BQ_tb.jpg" width="290" height="200" alt="Chloe nightclub"></li>
39+
<li><img src="http://logicbox.net/jquery/simplyscroll/assets/20080513_VPJWVQRW_tb.jpg" width="290" height="200" alt="Firehouse bar"></li>
40+
<li><img src="http://logicbox.net/jquery/simplyscroll/assets/20080514_B1YJ08B6_tb.jpg" width="290" height="200" alt="Firehouse chloe club fishtank"></li>
41+
<li><img src="http://logicbox.net/jquery/simplyscroll/assets/20080514_JYW68XPT_tb.jpg" width="290" height="200" alt="Firehouse restaurant"></li>
42+
<li><img src="http://logicbox.net/jquery/simplyscroll/assets/20080608_38CG51J2_tb.jpg" width="290" height="200" alt="Firehouse"></li>
43+
</ul>
44+
45+
46+
</body>
47+
</html>

0 commit comments

Comments
 (0)