diff --git a/scrolltofixed/scrolltofixed-tests.ts b/scrolltofixed/scrolltofixed-tests.ts index 23b787304..80d67922f 100644 --- a/scrolltofixed/scrolltofixed-tests.ts +++ b/scrolltofixed/scrolltofixed-tests.ts @@ -17,9 +17,6 @@ $(document).ready(function() { postFixed: function() { $(this).find('h1').css('color', ''); } }); - // Order matters because our summary limit is based on the position - // of the footer. On window refresh, the summary needs to recalculate - // after the footer. $('#summary').scrollToFixed({ marginTop: $('.header').outerHeight() + 10, limit: function() { @@ -32,4 +29,6 @@ $(document).ready(function() { postFixed: function() { $(this).find('.title').css('color', ''); }, postAbsolute: function() { $(this).find('.title').css('color', ''); } }); -}); \ No newline at end of file +}); + +var b = $.isScrollToFixed('.header'); \ No newline at end of file diff --git a/scrolltofixed/scrolltofixed.d.ts b/scrolltofixed/scrolltofixed.d.ts index a4581a368..f9fed47c5 100644 --- a/scrolltofixed/scrolltofixed.d.ts +++ b/scrolltofixed/scrolltofixed.d.ts @@ -31,15 +31,19 @@ declare module ScrollToFixed { } } -interface JQuery { +interface JQuery { + scrollToFixed : (options? : ScrollToFixed.ScrollToFixedOptions) => JQuery[]; +} + +interface JQueryStatic { isScrollToFixed(el: Element) : JQuery; isScrollToFixed(el: Element[]) : JQuery; isScrollToFixed(el: {}) : JQuery; isScrollToFixed(el: JQuery) : JQuery; + + ScrollToFixed(el: Element, options: ScrollToFixed.ScrollToFixedOptions): void; ScrollToFixed(el : Element, options : ScrollToFixed.ScrollToFixedOptions) : JQuery; ScrollToFixed(el: Element[], options : ScrollToFixed.ScrollToFixedOptions) : JQuery; ScrollToFixed(el: {}, options : ScrollToFixed.ScrollToFixedOptions) : JQuery; - ScrollToFixed(el: JQuery, options : ScrollToFixed.ScrollToFixedOptions) : JQuery; - - scrollToFixed : (options? : ScrollToFixed.ScrollToFixedOptions) => JQuery[]; + ScrollToFixed(el: JQuery, options : ScrollToFixed.ScrollToFixedOptions) : JQuery; } \ No newline at end of file