Empact/jquery-tinyscrollbar — pull request #2 by john-kurkowski (2011-11-29 04:08:13+00:00)
Title: fix infinite undefined errors when provided root doesn't have the required descendant nodes

I expected if the required structure isn't provided for tinyscrollbar that calling `.tinyscrollbar` would cause nothing to happen, same as operating on non-existant elements in jQuery (e.g. `$('.some .empty. .selection').fadeIn(); // does nothing`). However it causes infinite "is undefined" errors instead.

In my patch, maybe returning null isn't the best, as the caller's interface should be fluent, but typical usage is just `$('#some_scroll').tinyscrollbar();` without chaining.