How to know scroll position reached bottom using jquery

Implemented as below: Suppose we have a “DIV” tag with some content, <div id=”scrollbox”> Lorem ipsum dolor sit amet <br> Consectetuer augue nibh lacus at <br> Pretium Donec felis dolor penatibus <br> Phasellus consequat Vivamus dui lacinia <br> Ornare nonummy laoreet lacus Donec <br> Ut ut libero Curabitur id <br> Dui pretium hendrerit sapien Pellentesque […]

Implementation of “Backbone.js” in Rails 3.X

Introduction Build snappier, more interactive apps with cleaner code and better tests in less time. Backbone.js is a great way to organize client Javascript code into MVC (model, view, controller) pattern that Rails server application uses. Just like in Rails, It use models to represent data, views to render the data, and controllers to coordinate […]

Copy to clipboard using javascript(Zeroclipboard)

I tried so many ways to implement this, but found the below snippet very useful(using zeroclipboard.js) <html> <body> <script type=”text/javascript” src=”ZeroClipboard.js”></script> <script type=”text/javascript”> //set path ZeroClipboard.setMoviePath(‘ZeroClipboard.swf’); //create client var clip = new ZeroClipboard.Client(); //event clip.setHandCursor( true ); clip.addEventListener(‘mousedown’, function () { clip.setText(document.getElementById(‘box-content’).value); }); clip.addEventListener(‘complete’, function (client, text) { alert(‘copied: ‘ + text); }); //glue it […]