Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(window).trigger('scroll'); // init the value
- });
- $(window).on('scroll', function(){
- var pos=$('#subHeadline').offset();
- $('.article-header').each(function(){
- if(pos.top >= $(this).offset().top && pos.top <= $(this).next().offset().top)
- {
- $('#subHeadline').html($(this).html());
- return;
- }
- });
- $('button').on('click', function () {
- $(this).text($(this).text() == '(-)' ? '(+)' : '(-)');
- $('.description' ).slideToggle('fast');
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement