JQuery: autoscroll to last line of a div

Image you are working on a small web application where you use a JQuery UI dialog to inform the user about the current process. Triggered via SSE I am appending some messages via JavaScript. $(’#progress’).append("<span class=‘ui-icon ui-icon-alert’ style=‘float: left; margin-right: .3em’;>" + stderr + “ ”); In order to automaticly scroll to the last line I am using this two magic lines of JavaScript: var height = $(’#progress’)[0].scrollHeight; $(’#progress’).scrollTop(height); It is simple as that....

March 16, 2013 · 1 min · Christian Gmeiner

The choice of jQuery selector's

Sometimes if you are doing some fancy HTML5 development you wonder what jQuery selector would do the job. In such a case I can recommend the following little helper 🙂 http://codylindley.com/jqueryselectors/

February 5, 2013 · 1 min · Christian Gmeiner