Skip to content

Commit 55e4441

Browse files
committed
Update ScrollToFixed definitions
1 parent 018e116 commit 55e4441

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

scrolltofixed/scrolltofixed-tests.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ $(document).ready(function() {
1717
postFixed: function() { $(this).find('h1').css('color', ''); }
1818
});
1919

20-
// Order matters because our summary limit is based on the position
21-
// of the footer. On window refresh, the summary needs to recalculate
22-
// after the footer.
2320
$('#summary').scrollToFixed({
2421
marginTop: $('.header').outerHeight() + 10,
2522
limit: function() {
@@ -32,4 +29,6 @@ $(document).ready(function() {
3229
postFixed: function() { $(this).find('.title').css('color', ''); },
3330
postAbsolute: function() { $(this).find('.title').css('color', ''); }
3431
});
35-
});
32+
});
33+
34+
var b = $.isScrollToFixed('.header');

scrolltofixed/scrolltofixed.d.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,19 @@ declare module ScrollToFixed {
3131
}
3232
}
3333

34-
interface JQuery {
34+
interface JQuery {
35+
scrollToFixed : (options? : ScrollToFixed.ScrollToFixedOptions) => JQuery[];
36+
}
37+
38+
interface JQueryStatic {
3539
isScrollToFixed(el: Element) : JQuery;
3640
isScrollToFixed(el: Element[]) : JQuery;
3741
isScrollToFixed(el: {}) : JQuery;
3842
isScrollToFixed(el: JQuery) : JQuery;
43+
44+
ScrollToFixed(el: Element, options: ScrollToFixed.ScrollToFixedOptions): void;
3945
ScrollToFixed(el : Element, options : ScrollToFixed.ScrollToFixedOptions) : JQuery;
4046
ScrollToFixed(el: Element[], options : ScrollToFixed.ScrollToFixedOptions) : JQuery;
4147
ScrollToFixed(el: {}, options : ScrollToFixed.ScrollToFixedOptions) : JQuery;
42-
ScrollToFixed(el: JQuery, options : ScrollToFixed.ScrollToFixedOptions) : JQuery;
43-
44-
scrollToFixed : (options? : ScrollToFixed.ScrollToFixedOptions) => JQuery[];
48+
ScrollToFixed(el: JQuery, options : ScrollToFixed.ScrollToFixedOptions) : JQuery;
4549
}

0 commit comments

Comments
 (0)