Skip to content

Commit c12a253

Browse files
committed
Adding license, fixing IE8
1 parent c194583 commit c12a253

File tree

5 files changed

+52
-19
lines changed

5 files changed

+52
-19
lines changed

LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2013
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.markdown

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ easing | string | 'linear' | animate() fallback easing
2424
fade | boolean | false | Enables fade
2525
arrows | boolean | true | Enable Next/Prev arrows
2626
infinite | boolean | true | Infinite looping
27-
onBeforeChange | method | null | Before slide change callback
28-
onAfterChange | method | null | After slide change callback
27+
onBeforeChange(this, index) | method | null | Before slide change callback
28+
onAfterChange(this, index) | method | null | After slide change callback
2929
pauseOnHover | boolean | true | Pauses autoplay on hover
3030
responsive | object | null | Breakpoint triggered settings
3131
slide | string | 'div' | Slide element query
@@ -78,6 +78,6 @@ jQuery 1.7
7878

7979
Copyright (c) 2014 Ken Wheeler
8080

81-
Dual licensed under the MIT and GPL licenses.
81+
Licensed under the MIT license.
8282

8383
Free as in Bacon.

css/style.css

+9-6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ body, html {
1414
-moz-osx-font-smoothing: grayscale;
1515
}
1616
code {
17+
color: black;
1718
word-wrap: break-word;
1819
}
1920
h1 {
@@ -254,15 +255,14 @@ a {
254255
margin-top: 20px;
255256
}
256257

257-
@media only screen and (min-width:769px) {
258-
.content {
258+
.content {
259259
width: 600px;
260260
margin: auto;
261261
padding: 20px;
262262
}
263263
.fixed-header .header-content { width: 600px; margin: auto; }
264264

265-
}@media only screen and (max-width:420px) {
265+
@media only screen and (max-width:420px) {
266266
table {
267267
margin: 40px auto 20px;
268268
font-size: 10px;
@@ -272,9 +272,12 @@ a {
272272
ul.nav li a {
273273
font-size: 10px;
274274
}
275-
}@media only screen and (max-width:768px) {
276-
.content {
277-
margin: auto;
275+
}
276+
@media only screen and (max-width:768px) {
277+
.fixed-header .header-content { width: 100%; margin: auto; }
278+
.content {
279+
width: 100%;
280+
margin: auto;
278281
padding: 20px 40px;
279282
}
280283
.blue h3 {

index.html

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!DOCTYPE html>
12
<html lang="en">
23
<head>
34
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
@@ -9,6 +10,7 @@
910
<meta name="keywords" content="slick, responsive, carousel, slider, jQuery, plugin, CSS3, swipe, touch">
1011
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1112
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
13+
<script src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js" type="text/javascript"></script>
1214
<script>
1315
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
1416
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -376,12 +378,12 @@ <h2 >Settings</h2>
376378
<td>Infinite loop sliding</td>
377379
</tr>
378380
<tr>
379-
<td>onBeforeChange</td>
381+
<td>onBeforeChange(this,index)</td>
380382
<td>function, default: null</td>
381383
<td>Before slide callback</td>
382384
</tr>
383385
<tr>
384-
<td>onAfterChange</td>
386+
<td>onAfterChange(this,index)</td>
385387
<td>function, default: null</td>
386388
<td>After slide callback</td>
387389
</tr>
@@ -514,7 +516,8 @@ <h2>Go Get It</h2>
514516
</div>
515517
</section>
516518

517-
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
519+
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
520+
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
518521
<script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/highlight.min.js"></script>
519522
<script type="text/javascript" src="slick/slick.js"></script>
520523
<script type="text/javascript" src="js/scripts.js"></script>

slick/slick.js

+14-7
Original file line numberDiff line numberDiff line change
@@ -1115,15 +1115,18 @@
11151115

11161116
var _ = this, touches;
11171117

1118-
touches = event.originalEvent.touches;
11191118

11201119
if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
11211120
_.touchObject = {};
11221121
return false;
11231122
}
11241123

1125-
_.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
1126-
_.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
1124+
if(event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
1125+
touches = event.originalEvent.touches[0];
1126+
}
1127+
1128+
_.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
1129+
_.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
11271130

11281131
_.list.addClass('dragging');
11291132

@@ -1133,7 +1136,7 @@
11331136

11341137
var _ = this, curLeft, swipeDirection, positionOffset, touches;
11351138

1136-
touches = event.originalEvent.touches;
1139+
touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
11371140

11381141
curLeft = _.options.vertical === false ? ((_.currentSlide * _.slideWidth) * -1) +
11391142
_.slideOffset : ((_.currentSlide * _.listHeight) * -1) -
@@ -1156,7 +1159,9 @@
11561159
return false;
11571160
}
11581161

1159-
event.originalEvent.preventDefault();
1162+
if(event.originalEvent !== undefined) {
1163+
event.preventDefault();
1164+
}
11601165

11611166
positionOffset = _.touchObject.curX > _.touchObject.startX ? 1 : -1;
11621167

@@ -1227,8 +1232,10 @@
12271232

12281233
var _ = this;
12291234

1230-
_.touchObject.fingerCount = event.originalEvent.touches !== undefined ?
1231-
event.originalEvent.touches.length : 1;
1235+
if(event.originalEvent !== undefined) {
1236+
_.touchObject.fingerCount = event.originalEvent.touches !== undefined ?
1237+
event.originalEvent.touches.length : 1;
1238+
}
12321239

12331240
_.touchObject.minSwipe = _.listWidth / _.options
12341241
.touchThreshold;

0 commit comments

Comments
 (0)