Skip to content

orange35/jquery.fluidContentScroller

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

<link rel="stylesheet" href="css/jquery.contentScroller.css"/>

<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/jquery.contentScroller.js"></script>

Full screen with default behavior:

$("#content").find("> .post").contentScroller();

Custom scrollable container with custom title for navigation items:

$('#scroll-content').find("> .post").contentScroller({
    container: '#scroll-content',
    navItem: {
        title: '[data-cs-title]'
    }
});

Custom container and Tooltips with Twitter Bootstrap:

var tipCallback = function () {
    return $('h2:first', $(this).data('csTarget')).text();
};
$(".demo-item").contentScroller({
    container: '#scroll-content',
    onInit: function (target, top, bottom) {
        top.find('li').tooltip({ title: tipCallback });
        bottom.find('li').tooltip({ title: tipCallback });
    }
});

Custom title with WordPress:

var options = {
    navItem: {
        title: function (index, itemNode) {
            return $('.entry-date', itemNode).text();
        }
    }
};
if ($('#wpadminbar').length) {
    options.nav = options.nav || {};
    options.nav['topClass'] = 'cs-top-wpadmin';
}
$('#content > .post').contentScroller(options);

Bugs and feature requests

Have a bug or a feature request? Please open a new issue.

Copyright and license

Copyright 2013 Orange35, under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •