[UPDATE] modified function to support SVG className object.