workaround for jquery swapping of HTML tag