jscroll

WebJar for jscroll

License

License

MIT
Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-pklauzinski-jscroll
Last Version

Last Version

2.4.1
Release Date

Release Date

Type

Type

jar
Description

Description

jscroll
WebJar for jscroll
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/pklauzinski/jscroll

Download github-com-pklauzinski-jscroll

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-pklauzinski-jscroll/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-pklauzinski-jscroll</artifactId>
    <version>2.4.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-pklauzinski-jscroll/
implementation 'org.webjars.npm:github-com-pklauzinski-jscroll:2.4.1'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-pklauzinski-jscroll/
implementation ("org.webjars.npm:github-com-pklauzinski-jscroll:2.4.1")
'org.webjars.npm:github-com-pklauzinski-jscroll:jar:2.4.1'
<dependency org="org.webjars.npm" name="github-com-pklauzinski-jscroll" rev="2.4.1">
  <artifact name="github-com-pklauzinski-jscroll" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-pklauzinski-jscroll', version='2.4.1')
)
libraryDependencies += "org.webjars.npm" % "github-com-pklauzinski-jscroll" % "2.4.1"
[org.webjars.npm/github-com-pklauzinski-jscroll "2.4.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

jScroll - jQuery Plugin for Infinite Scrolling / Auto-Paging

Build Status npm version Bower version Join the chat at https://gitter.im/pklauzinski/jscroll

Official site at jscroll.com.

Requires jQuery v1.8.0+

Facebook Page

Follow us on Facebook for commit updates: https://www.facebook.com/jScroll.Infinite.Scrolling

Usage

The jscroll method is called on the selector for which you want your scrollable content contained within. For example:

$('.jscroll').jscroll();

The jscroll method takes an optional object literal as a parameter for overriding the default options. An example of how this can be done is shown below.

$('.jscroll').jscroll({
    loadingHtml: '<img src="loading.gif" alt="Loading" /> Loading...',
    padding: 20,
    nextSelector: 'a.jscroll-next:last',
    contentSelector: 'li'
});

Options

  • debug (false) - When set to true, outputs useful information to the console display if the console object exists.
  • autoTrigger (true) - When set to true, triggers the loading of the next set of content automatically when the user scrolls to the bottom of the containing element. When set to false, the required next link will trigger the loading of the next set of content when clicked.
  • autoTriggerUntil (false) - Set to an integer greater than 0 to turn off autoTrigger of paging after the specified number of pages. Requires autoTrigger to be true.
  • loadingHtml ('<small>Loading...</small>') - The HTML to show at the bottom of the content while loading the next set.
  • loadingFunction (false) - A JavaScript function to run after the loadingHtml has been drawn.
  • padding (0) - The distance from the bottom of the scrollable content at which to trigger the loading of the next set of content. This only applies when autoTrigger is set to true.
  • nextSelector ('a:last') - The selector to use for finding the link which contains the href pointing to the next set of content. If this selector is not found, or if it does not contain a href attribute, jScroll will self-destroy and unbind from the element upon which it was called.
  • contentSelector ('') - A convenience selector for loading only part of the content in the response for the next set of content. This selector will be ignored if left blank and will apply the entire response to the DOM.
  • pagingSelector ('') - Optionally define a selector for your paging controls so that they will be hidden, instead of just hiding the next page link.
  • callback (false) - Optionally define a callback function to be called after a set of content has been loaded.

For more information on the contentSelector option and how it loads a response fragment, see the jQuery documentation for the .load() method.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

LICENSES:

Versions

Version
2.4.1