Created
April 1, 2015 08:02
-
-
Save loominade/4082e9166739e8a25ab5 to your computer and use it in GitHub Desktop.
ever bothered there is a scrollLeft() but no scrollRight() function in jQuery?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.extend({ | |
scrollRight: function(property) { | |
return this[0].scrollWidth - (this[0].scrollLeft + this[0].clientWidth) + 1; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this should be on the next version of ecma