added error handling when no `.js-input` element is found