Jquery-like syntax & fix jshint warnings