fix flash issue using jquery