Skip to content

Commit a3db179

Browse files
Gets jasmine running
1 parent c6197ff commit a3db179

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

Gruntfile.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,14 @@ module.exports = function(grunt) {
6565
},
6666
},
6767
jasmine: {
68-
files: ['test/**/*.html']
68+
src: 'src/<%= pkg.name %>.js',
69+
options: {
70+
specs: 'test/*_spec.js',
71+
vendor: [
72+
'http://code.jquery.com/jquery-1.10.1.min.js',
73+
'http://code.jquery.com/ui/1.10.3/jquery-ui.min.js'
74+
]
75+
}
6976
},
7077
jshint: {
7178
gruntfile: {

src/jquery-ui-sliderAccess.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
options = options || {};
1818
options.touchonly = options.touchonly !== undefined? options.touchonly : true; // by default only show it if touch device
1919

20-
if(options.touchonly === true && !("ontouchend" in document))
20+
if(options.touchonly === true && !("ontouchend" in document)){
2121
return $(this);
22+
}
2223

2324
return $(this).each(function(i,obj){
2425
var $t = $(this),
@@ -56,8 +57,9 @@
5657

5758
e.preventDefault();
5859

59-
if(newval < minval || newval > maxval)
60+
if(newval < minval || newval > maxval){
6061
return;
62+
}
6163

6264
$t.slider('value', newval);
6365

@@ -77,8 +79,8 @@
7779

7880
// adjust the width so we don't break the original layout
7981
var bOuterWidth = $buttons.css({
80-
marginLeft: ((o.where == 'after' && !o.isRTL) || (o.where == 'before' && o.isRTL)? 10:0),
81-
marginRight: ((o.where == 'before' && !o.isRTL) || (o.where == 'after' && o.isRTL)? 10:0)
82+
marginLeft: ((o.where === 'after' && !o.isRTL) || (o.where === 'before' && o.isRTL)? 10:0),
83+
marginRight: ((o.where === 'before' && !o.isRTL) || (o.where === 'after' && o.isRTL)? 10:0)
8284
}).outerWidth(true) + 5;
8385
var tOuterWidth = $t.outerWidth(true);
8486
$t.css('display','inline-block').width(tOuterWidth-bOuterWidth);

0 commit comments

Comments
 (0)