mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add new definition and tests for jQuery.scrollTo
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/// <reference path="../jquery/jquery.d.ts"/>
|
||||
/// <reference path="jquery.scrollTo.d.ts"/>
|
||||
|
||||
$('div').scrollTo(340);
|
||||
|
||||
$('div').scrollTo('+=340px', { axis: 'y' });
|
||||
|
||||
$('div').scrollTo('p.paragraph:eq(2)', 500, { easing: 'swing', queue: true, axis: 'xy' });
|
||||
|
||||
var second_child = document.getElementById('container').firstChild.nextSibling;
|
||||
$('#container').scrollTo(second_child, {
|
||||
duration: 500, axis: 'x', onAfter: function () {
|
||||
alert('scrolled!!');
|
||||
}
|
||||
});
|
||||
|
||||
$('div').scrollTo({ top: 300, left: '+=200' }, { axis: 'xy', offset: -20 });
|
||||
|
||||
$.scrollTo(340);
|
||||
|
||||
$.scrollTo('+=340px', { axis: 'y' });
|
||||
|
||||
$.scrollTo('p.paragraph:eq(2)', 500, { easing: 'swing', queue: true, axis: 'xy' });
|
||||
|
||||
$.scrollTo(second_child, {
|
||||
duration: 500, axis: 'x', onAfter: function () {
|
||||
alert('scrolled!!');
|
||||
}
|
||||
});
|
||||
|
||||
$.scrollTo({ top: 300, left: '+=200' }, { axis: 'xy', offset: -20 });
|
||||
Reference in New Issue
Block a user