Skip to content

Instantly share code, notes, and snippets.

@loominade
loominade / jqueryScrollRight.js
Created April 1, 2015 08:02
ever bothered there is a scrollLeft() but no scrollRight() function in jQuery?
$.fn.extend({
scrollRight: function(property) {
return this[0].scrollWidth - (this[0].scrollLeft + this[0].clientWidth) + 1;
}
});