jquery-scrollto-rails 1.4.2 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b53b6a9fda85610e0b87f7c7f7fa28be85166bd2
4
+ data.tar.gz: a0645b3ca2b3ce00e8496876a6831a5b2bf1e89a
5
+ SHA512:
6
+ metadata.gz: b62e4389decfc7518df14f42214804bb632e0d0ae256ab22127ecab7433660464661af5bffe68680afc8a9bbef8bea726e42b43fbae5d4b67f5a115bed4b1749
7
+ data.tar.gz: a936eccc3fa17cc0949ee114ae6384ad78cbd2dbbb944b44b6db9a79e9fc2aad727cc4dcd11993576c38e4d66d70ef5c3c579d626e2ae8ab1fd4295545ddeba0
data/README.md CHANGED
@@ -4,8 +4,8 @@ This gem provides the jquery scrollTo project found at http://archive.plugins.jq
4
4
 
5
5
  To make use of this project add ONE of the following lines to 'app/assets/javascripts/application.js':
6
6
 
7
- //= require scrollTo-min
8
- //= require scrollTo
7
+ //= require jquery.scrollTo.min
8
+ //= require jquery.scrollTo
9
9
 
10
10
  ### Installation
11
11
 
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
 
14
14
  s.rubyforge_project = "jquery-scrollto-rails"
15
15
 
16
- s.add_dependency "railties", "~> 3.1"
16
+ s.add_dependency "railties", "> 3.1", "< 5.0"
17
17
 
18
18
  s.files = `git ls-files`.split("\n")
19
19
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -1,5 +1,5 @@
1
1
  module JqueryScrollto
2
2
  module Rails
3
- VERSION = "1.4.2"
3
+ VERSION = "1.4.3"
4
4
  end
5
5
  end
@@ -1,215 +1,218 @@
1
- /**
2
- * jQuery.ScrollTo
3
- * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
4
- * Dual licensed under MIT and GPL.
5
- * Date: 5/25/2009
6
- *
7
- * @projectDescription Easy element scrolling using jQuery.
8
- * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
9
- * Works with jQuery +1.2.6. Tested on FF 2/3, IE 6/7/8, Opera 9.5/6, Safari 3, Chrome 1 on WinXP.
10
- *
11
- * @author Ariel Flesler
12
- * @version 1.4.2
13
- *
14
- * @id jQuery.scrollTo
15
- * @id jQuery.fn.scrollTo
16
- * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements.
17
- * The different options for target are:
18
- * - A number position (will be applied to all axes).
19
- * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes
20
- * - A jQuery/DOM element ( logically, child of the element to scroll )
21
- * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc )
22
- * - A hash { top:x, left:y }, x and y can be any kind of number/string like above.
23
- * - A percentage of the container's dimension/s, for example: 50% to go to the middle.
24
- * - The string 'max' for go-to-end.
25
- * @param {Number} duration The OVERALL length of the animation, this argument can be the settings object instead.
26
- * @param {Object,Function} settings Optional set of settings or the onAfter callback.
27
- * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'.
28
- * @option {Number} duration The OVERALL length of the animation.
29
- * @option {String} easing The easing method for the animation.
30
- * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position.
31
- * @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }.
32
- * @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes.
33
- * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends.
34
- * @option {Function} onAfter Function to be called after the scrolling ends.
35
- * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends.
36
- * @return {jQuery} Returns the same jQuery object, for chaining.
37
- *
38
- * @desc Scroll to a fixed position
39
- * @example $('div').scrollTo( 340 );
40
- *
41
- * @desc Scroll relatively to the actual position
42
- * @example $('div').scrollTo( '+=340px', { axis:'y' } );
43
- *
44
- * @dec Scroll using a selector (relative to the scrolled element)
45
- * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } );
46
- *
47
- * @ Scroll to a DOM element (same for jQuery object)
48
- * @example var second_child = document.getElementById('container').firstChild.nextSibling;
49
- * $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){
50
- * alert('scrolled!!');
51
- * }});
52
- *
53
- * @desc Scroll on both axes, to different values
54
- * @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } );
55
- */
56
- ;(function( $ ){
57
-
58
- var $scrollTo = $.scrollTo = function( target, duration, settings ){
59
- $(window).scrollTo( target, duration, settings );
60
- };
61
-
62
- $scrollTo.defaults = {
63
- axis:'xy',
64
- duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1
65
- };
66
-
67
- // Returns the element that needs to be animated to scroll the window.
68
- // Kept for backwards compatibility (specially for localScroll & serialScroll)
69
- $scrollTo.window = function( scope ){
70
- return $(window)._scrollable();
71
- };
72
-
73
- // Hack, hack, hack :)
74
- // Returns the real elements to scroll (supports window/iframes, documents and regular nodes)
75
- $.fn._scrollable = function(){
76
- return this.map(function(){
77
- var elem = this,
78
- isWin = !elem.nodeName || $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) != -1;
79
-
80
- if( !isWin )
81
- return elem;
82
-
83
- var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem;
84
-
85
- return $.browser.safari || doc.compatMode == 'BackCompat' ?
86
- doc.body :
87
- doc.documentElement;
88
- });
89
- };
90
-
91
- $.fn.scrollTo = function( target, duration, settings ){
92
- if( typeof duration == 'object' ){
93
- settings = duration;
94
- duration = 0;
95
- }
96
- if( typeof settings == 'function' )
97
- settings = { onAfter:settings };
98
-
99
- if( target == 'max' )
100
- target = 9e9;
101
-
102
- settings = $.extend( {}, $scrollTo.defaults, settings );
103
- // Speed is still recognized for backwards compatibility
104
- duration = duration || settings.speed || settings.duration;
105
- // Make sure the settings are given right
106
- settings.queue = settings.queue && settings.axis.length > 1;
107
-
108
- if( settings.queue )
109
- // Let's keep the overall duration
110
- duration /= 2;
111
- settings.offset = both( settings.offset );
112
- settings.over = both( settings.over );
113
-
114
- return this._scrollable().each(function(){
115
- var elem = this,
116
- $elem = $(elem),
117
- targ = target, toff, attr = {},
118
- win = $elem.is('html,body');
119
-
120
- switch( typeof targ ){
121
- // A number will pass the regex
122
- case 'number':
123
- case 'string':
124
- if( /^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ) ){
125
- targ = both( targ );
126
- // We are done
127
- break;
128
- }
129
- // Relative selector, no break!
130
- targ = $(targ,this);
131
- case 'object':
132
- // DOMElement / jQuery
133
- if( targ.is || targ.style )
134
- // Get the real position of the target
135
- toff = (targ = $(targ)).offset();
136
- }
137
- $.each( settings.axis.split(''), function( i, axis ){
138
- var Pos = axis == 'x' ? 'Left' : 'Top',
139
- pos = Pos.toLowerCase(),
140
- key = 'scroll' + Pos,
141
- old = elem[key],
142
- max = $scrollTo.max(elem, axis);
143
-
144
- if( toff ){// jQuery / DOMElement
145
- attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] );
146
-
147
- // If it's a dom element, reduce the margin
148
- if( settings.margin ){
149
- attr[key] -= parseInt(targ.css('margin'+Pos)) || 0;
150
- attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 0;
151
- }
152
-
153
- attr[key] += settings.offset[pos] || 0;
154
-
155
- if( settings.over[pos] )
156
- // Scroll to a fraction of its width/height
157
- attr[key] += targ[axis=='x'?'width':'height']() * settings.over[pos];
158
- }else{
159
- var val = targ[pos];
160
- // Handle percentage values
161
- attr[key] = val.slice && val.slice(-1) == '%' ?
162
- parseFloat(val) / 100 * max
163
- : val;
164
- }
165
-
166
- // Number or 'number'
167
- if( /^\d+$/.test(attr[key]) )
168
- // Check the limits
169
- attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max );
170
-
171
- // Queueing axes
172
- if( !i && settings.queue ){
173
- // Don't waste time animating, if there's no need.
174
- if( old != attr[key] )
175
- // Intermediate animation
176
- animate( settings.onAfterFirst );
177
- // Don't animate this axis again in the next iteration.
178
- delete attr[key];
179
- }
180
- });
181
-
182
- animate( settings.onAfter );
183
-
184
- function animate( callback ){
185
- $elem.animate( attr, duration, settings.easing, callback && function(){
186
- callback.call(this, target, settings);
187
- });
188
- };
189
-
190
- }).end();
191
- };
192
-
193
- // Max scrolling position, works on quirks mode
194
- // It only fails (not too badly) on IE, quirks mode.
195
- $scrollTo.max = function( elem, axis ){
196
- var Dim = axis == 'x' ? 'Width' : 'Height',
197
- scroll = 'scroll'+Dim;
198
-
199
- if( !$(elem).is('html,body') )
200
- return elem[scroll] - $(elem)[Dim.toLowerCase()]();
201
-
202
- var size = 'client' + Dim,
203
- html = elem.ownerDocument.documentElement,
204
- body = elem.ownerDocument.body;
205
-
206
- return Math.max( html[scroll], body[scroll] )
207
- - Math.min( html[size] , body[size] );
208
-
209
- };
210
-
211
- function both( val ){
212
- return typeof val == 'object' ? val : { top:val, left:val };
213
- };
214
-
1
+ /*!
2
+ * jQuery.ScrollTo
3
+ * Copyright (c) 2007-2012 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
4
+ * Dual licensed under MIT and GPL.
5
+ * Date: 4/09/2012
6
+ *
7
+ * @projectDescription Easy element scrolling using jQuery.
8
+ * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
9
+ * @author Ariel Flesler
10
+ * @version 1.4.3.1
11
+ *
12
+ * @id jQuery.scrollTo
13
+ * @id jQuery.fn.scrollTo
14
+ * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements.
15
+ * The different options for target are:
16
+ * - A number position (will be applied to all axes).
17
+ * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes
18
+ * - A jQuery/DOM element ( logically, child of the element to scroll )
19
+ * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc )
20
+ * - A hash { top:x, left:y }, x and y can be any kind of number/string like above.
21
+ * - A percentage of the container's dimension/s, for example: 50% to go to the middle.
22
+ * - The string 'max' for go-to-end.
23
+ * @param {Number, Function} duration The OVERALL length of the animation, this argument can be the settings object instead.
24
+ * @param {Object,Function} settings Optional set of settings or the onAfter callback.
25
+ * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'.
26
+ * @option {Number, Function} duration The OVERALL length of the animation.
27
+ * @option {String} easing The easing method for the animation.
28
+ * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position.
29
+ * @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }.
30
+ * @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes.
31
+ * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends.
32
+ * @option {Function} onAfter Function to be called after the scrolling ends.
33
+ * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends.
34
+ * @return {jQuery} Returns the same jQuery object, for chaining.
35
+ *
36
+ * @desc Scroll to a fixed position
37
+ * @example $('div').scrollTo( 340 );
38
+ *
39
+ * @desc Scroll relatively to the actual position
40
+ * @example $('div').scrollTo( '+=340px', { axis:'y' } );
41
+ *
42
+ * @desc Scroll using a selector (relative to the scrolled element)
43
+ * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } );
44
+ *
45
+ * @desc Scroll to a DOM element (same for jQuery object)
46
+ * @example var second_child = document.getElementById('container').firstChild.nextSibling;
47
+ * $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){
48
+ * alert('scrolled!!');
49
+ * }});
50
+ *
51
+ * @desc Scroll on both axes, to different values
52
+ * @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } );
53
+ */
54
+
55
+ ;(function( $ ){
56
+
57
+ var $scrollTo = $.scrollTo = function( target, duration, settings ){
58
+ $(window).scrollTo( target, duration, settings );
59
+ };
60
+
61
+ $scrollTo.defaults = {
62
+ axis:'xy',
63
+ duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1,
64
+ limit:true
65
+ };
66
+
67
+ // Returns the element that needs to be animated to scroll the window.
68
+ // Kept for backwards compatibility (specially for localScroll & serialScroll)
69
+ $scrollTo.window = function( scope ){
70
+ return $(window)._scrollable();
71
+ };
72
+
73
+ // Hack, hack, hack :)
74
+ // Returns the real elements to scroll (supports window/iframes, documents and regular nodes)
75
+ $.fn._scrollable = function(){
76
+ return this.map(function(){
77
+ var elem = this,
78
+ isWin = !elem.nodeName || $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) != -1;
79
+
80
+ if( !isWin )
81
+ return elem;
82
+
83
+ var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem;
84
+
85
+ return /webkit/i.test(navigator.userAgent) || doc.compatMode == 'BackCompat' ?
86
+ doc.body :
87
+ doc.documentElement;
88
+ });
89
+ };
90
+
91
+ $.fn.scrollTo = function( target, duration, settings ){
92
+ if( typeof duration == 'object' ){
93
+ settings = duration;
94
+ duration = 0;
95
+ }
96
+ if( typeof settings == 'function' )
97
+ settings = { onAfter:settings };
98
+
99
+ if( target == 'max' )
100
+ target = 9e9;
101
+
102
+ settings = $.extend( {}, $scrollTo.defaults, settings );
103
+ // Speed is still recognized for backwards compatibility
104
+ duration = duration || settings.duration;
105
+ // Make sure the settings are given right
106
+ settings.queue = settings.queue && settings.axis.length > 1;
107
+
108
+ if( settings.queue )
109
+ // Let's keep the overall duration
110
+ duration /= 2;
111
+ settings.offset = both( settings.offset );
112
+ settings.over = both( settings.over );
113
+
114
+ return this._scrollable().each(function(){
115
+ // Null target yields nothing, just like jQuery does
116
+ if (target == null) return;
117
+
118
+ var elem = this,
119
+ $elem = $(elem),
120
+ targ = target, toff, attr = {},
121
+ win = $elem.is('html,body');
122
+
123
+ switch( typeof targ ){
124
+ // A number will pass the regex
125
+ case 'number':
126
+ case 'string':
127
+ if( /^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ) ){
128
+ targ = both( targ );
129
+ // We are done
130
+ break;
131
+ }
132
+ // Relative selector, no break!
133
+ targ = $(targ,this);
134
+ if (!targ.length) return;
135
+ case 'object':
136
+ // DOMElement / jQuery
137
+ if( targ.is || targ.style )
138
+ // Get the real position of the target
139
+ toff = (targ = $(targ)).offset();
140
+ }
141
+ $.each( settings.axis.split(''), function( i, axis ){
142
+ var Pos = axis == 'x' ? 'Left' : 'Top',
143
+ pos = Pos.toLowerCase(),
144
+ key = 'scroll' + Pos,
145
+ old = elem[key],
146
+ max = $scrollTo.max(elem, axis);
147
+
148
+ if( toff ){// jQuery / DOMElement
149
+ attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] );
150
+
151
+ // If it's a dom element, reduce the margin
152
+ if( settings.margin ){
153
+ attr[key] -= parseInt(targ.css('margin'+Pos)) || 0;
154
+ attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 0;
155
+ }
156
+
157
+ attr[key] += settings.offset[pos] || 0;
158
+
159
+ if( settings.over[pos] )
160
+ // Scroll to a fraction of its width/height
161
+ attr[key] += targ[axis=='x'?'width':'height']() * settings.over[pos];
162
+ }else{
163
+ var val = targ[pos];
164
+ // Handle percentage values
165
+ attr[key] = val.slice && val.slice(-1) == '%' ?
166
+ parseFloat(val) / 100 * max
167
+ : val;
168
+ }
169
+
170
+ // Number or 'number'
171
+ if( settings.limit && /^\d+$/.test(attr[key]) )
172
+ // Check the limits
173
+ attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max );
174
+
175
+ // Queueing axes
176
+ if( !i && settings.queue ){
177
+ // Don't waste time animating, if there's no need.
178
+ if( old != attr[key] )
179
+ // Intermediate animation
180
+ animate( settings.onAfterFirst );
181
+ // Don't animate this axis again in the next iteration.
182
+ delete attr[key];
183
+ }
184
+ });
185
+
186
+ animate( settings.onAfter );
187
+
188
+ function animate( callback ){
189
+ $elem.animate( attr, duration, settings.easing, callback && function(){
190
+ callback.call(this, target, settings);
191
+ });
192
+ };
193
+
194
+ }).end();
195
+ };
196
+
197
+ // Max scrolling position, works on quirks mode
198
+ // It only fails (not too badly) on IE, quirks mode.
199
+ $scrollTo.max = function( elem, axis ){
200
+ var Dim = axis == 'x' ? 'Width' : 'Height',
201
+ scroll = 'scroll'+Dim;
202
+
203
+ if( !$(elem).is('html,body') )
204
+ return elem[scroll] - $(elem)[Dim.toLowerCase()]();
205
+
206
+ var size = 'client' + Dim,
207
+ html = elem.ownerDocument.documentElement,
208
+ body = elem.ownerDocument.body;
209
+
210
+ return Math.max( html[scroll], body[scroll] )
211
+ - Math.min( html[size] , body[size] );
212
+ };
213
+
214
+ function both( val ){
215
+ return typeof val == 'object' ? val : { top:val, left:val };
216
+ };
217
+
215
218
  })( jQuery );
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright (c) 2007-2012 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
3
+ * Dual licensed under MIT and GPL.
4
+ * @author Ariel Flesler
5
+ * @version 1.4.3.1
6
+ */
7
+ ;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
metadata CHANGED
@@ -1,47 +1,42 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: jquery-scrollto-rails
3
- version: !ruby/object:Gem::Version
4
- hash: 3
5
- prerelease:
6
- segments:
7
- - 1
8
- - 4
9
- - 2
10
- version: 1.4.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.4.3
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - John Colvin
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2012-02-03 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2013-09-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: railties
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 5
29
- segments:
30
- - 3
31
- - 1
32
- version: "3.1"
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>'
18
+ - !ruby/object:Gem::Version
19
+ version: '3.1'
20
+ - - <
21
+ - !ruby/object:Gem::Version
22
+ version: '5.0'
33
23
  type: :runtime
34
- version_requirements: *id001
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - '>'
28
+ - !ruby/object:Gem::Version
29
+ version: '3.1'
30
+ - - <
31
+ - !ruby/object:Gem::Version
32
+ version: '5.0'
35
33
  description: This provides jQUery scrollTo for your Rails 3 application
36
- email:
34
+ email:
37
35
  - colvin.john@gmail.com
38
36
  executables: []
39
-
40
37
  extensions: []
41
-
42
38
  extra_rdoc_files: []
43
-
44
- files:
39
+ files:
45
40
  - .gitignore
46
41
  - Gemfile
47
42
  - LICENSE
@@ -52,40 +47,30 @@ files:
52
47
  - lib/jquery-scrollto-rails/rails.rb
53
48
  - lib/jquery-scrollto-rails/rails/engine.rb
54
49
  - lib/jquery-scrollto-rails/rails/version.rb
55
- - vendor/assets/javascripts/scrollTo-min.js
56
- - vendor/assets/javascripts/scrollTo.js
50
+ - vendor/assets/javascripts/jquery.scrollTo.js
51
+ - vendor/assets/javascripts/jquery.scrollTo.min.js
57
52
  homepage: https://github.com/JohnColvin/jquery-scrollto-rails
58
53
  licenses: []
59
-
54
+ metadata: {}
60
55
  post_install_message:
61
56
  rdoc_options: []
62
-
63
- require_paths:
57
+ require_paths:
64
58
  - lib
65
- required_ruby_version: !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
74
- required_rubygems_version: !ruby/object:Gem::Requirement
75
- none: false
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- hash: 3
80
- segments:
81
- - 0
82
- version: "0"
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
83
69
  requirements: []
84
-
85
70
  rubyforge_project: jquery-scrollto-rails
86
- rubygems_version: 1.8.15
71
+ rubygems_version: 2.0.2
87
72
  signing_key:
88
- specification_version: 3
73
+ specification_version: 4
89
74
  summary: Use jQuery scrollTo with Rails 3
90
75
  test_files: []
91
-
76
+ has_rdoc:
@@ -1,11 +0,0 @@
1
- /**
2
- * jQuery.ScrollTo - Easy element scrolling using jQuery.
3
- * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
4
- * Dual licensed under MIT and GPL.
5
- * Date: 5/25/2009
6
- * @author Ariel Flesler
7
- * @version 1.4.2
8
- *
9
- * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
10
- */
11
- ;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);