import js jq = js.eval("$") first_line = jq(jq(".container p")[0]) first_line.text("jQuery was here")