Enable API compatibility by accepting jQuery objects as element