Javascript equivalent to jQuery basics