简体   繁体   中英

How can I add a fadeIn effect to a string in jQuery?

I've got the following string that increments my integer contained within a paragraph, and I'd like to append the fadeIn() jQuery function to it. I've tried to concatenate it to the end of the string, but that didn't work. Any suggestions on what to do here?

  $p.text(parseInt($p.text(),10) + 1); 

尝试

$p.text(parseInt($p.text(),10) + 1).hide().fadeIn();

尝试$p.text(parseInt($p.text(),10) + 1).hide().fadeIn();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM