mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
/// <reference path="scrolltofixed.d.ts" />
|
|
|
|
$(document).ready(function() {
|
|
$('#mydiv').scrollToFixed();
|
|
});
|
|
|
|
$(document).ready(function() {
|
|
$('.header').scrollToFixed({
|
|
preFixed: function() { $(this).find('h1').css('color', 'blue'); },
|
|
postFixed: function() { $(this).find('h1').css('color', ''); }
|
|
});
|
|
|
|
$('.footer').scrollToFixed( {
|
|
bottom: 0,
|
|
limit: $('.footer').offset().top,
|
|
preFixed: function() { $(this).find('h1').css('color', 'blue'); },
|
|
postFixed: function() { $(this).find('h1').css('color', ''); }
|
|
});
|
|
|
|
$('#summary').scrollToFixed({
|
|
marginTop: $('.header').outerHeight() + 10,
|
|
limit: function() {
|
|
var limit = $('.footer').offset().top - $('#summary').outerHeight(true) - 10;
|
|
return limit;
|
|
},
|
|
zIndex: 999,
|
|
preFixed: function() { $(this).find('.title').css('color', 'blue'); },
|
|
preAbsolute: function() { $(this).find('.title').css('color', 'red'); },
|
|
postFixed: function() { $(this).find('.title').css('color', ''); },
|
|
postAbsolute: function() { $(this).find('.title').css('color', ''); }
|
|
});
|
|
});
|
|
|
|
var b = $.isScrollToFixed('.header'); |