Skip to content

Commit 9214f02

Browse files
committed
Added compatibility with jQuery 3.0.0 (changed size() to length).
1 parent 1200795 commit 9214f02

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

demo/demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta name="viewport" content="width=device-width,initial-scale=1">
77
<link rel="stylesheet" href="../responsiveslides.css">
88
<link rel="stylesheet" href="demo.css">
9-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
9+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
1010
<script src="../responsiveslides.min.js"></script>
1111
<script>
1212
// You can also use "$(window).load(function() {"

responsiveslides.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
// Helpers
5050
index = 0,
5151
$slide = $this.children(),
52-
length = $slide.size(),
52+
length = $slide.length,
5353
fadeTime = parseFloat(settings.speed),
5454
waitTime = parseFloat(settings.timeout),
5555
maxw = parseFloat(settings.maxwidth),
@@ -171,7 +171,7 @@
171171
}
172172

173173
// Only run if there's more than one slide
174-
if ($slide.size() > 1) {
174+
if ($slide.length > 1) {
175175

176176
// Make sure the timeout is at least 100ms longer than the fade
177177
if (waitTime < fadeTime + 100) {

responsiveslides.min.js

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)