Pass element instead of element id