Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jquery.jscroll.js #81

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kishoreweblabs
Copy link

Added 2 New callback function 'beforeSend' and 'afterContentLoad' and new option reTriggerUntil option
added two public function 'getdata' and 'getOptions' , and
load request is changed to ajax get method for better content manupulation.

beforeSend- is called before sending the ajax request. Useful for changing the 'nextHref' or append some parameter to 'nextHref'
afterContentLoad- is called after data is received, but data is not appended to the scrolling div. Useful for data manipulation or formatting the received data.
reTriggerUntil - it will restart the scrolling when next button is clicked on

getdata and getOptions public let you access the jscroll data and option.

Removed animate and load function for better data handing and animation
$e.animate({scrollTop: $inner.outerHeight()}, 0, function() {})
animate don't let us to run our custom animation code. Better approach is to use it in 'Callback' function

$inner.find('div.jscroll-added').last().load(data.nextHref, function(r, status) {});
.load is replaced with
$.get(data.nextHref, function(r, status) {});

for better content handing

Thanks
Kishore
Kishoreweblabs.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant