¡@

Home 

2014/10/16 ¤W¤È 12:06:06

jquery Programming Glossary: overlimit

Micropost character countdown (Rails Tutorial, 2nd Ed, Chapter 10, Exercise 7)

http://stackoverflow.com/questions/10955850/micropost-character-countdown-rails-tutorial-2nd-ed-chapter-10-exercise-7

the text gradually turns redder and once the micropost is overlimit the Post button disables finishing like so . The current implementation.. if toAdd .remaining .countdown .addClass toAdd if toAdd is overlimit input.btn.btn large.btn primary .attr disabled true else input.btn.btn.. .val .length toRemove nearlimit almostlimit overlimit if remaining 19 updateCountdownAttributes toRemove if remaining..

Micropost character countdown (Rails Tutorial, 2nd Ed, Chapter 10, Exercise 7)

http://stackoverflow.com/questions/10955850/micropost-character-countdown-rails-tutorial-2nd-ed-chapter-10-exercise-7

looks like this and as you get closer to the character limit the text gradually turns redder and once the micropost is overlimit the Post button disables finishing like so . The current implementation looks like views shared _micropost_form.html.haml.. attr in toRemove .remaining .countdown .removeClass attr if toAdd .remaining .countdown .addClass toAdd if toAdd is overlimit input.btn.btn large.btn primary .attr disabled true else input.btn.btn large.btn primary .removeAttr disabled updateCountdown.. .removeAttr disabled updateCountdown remaining 140 #micropost_content .val .length toRemove nearlimit almostlimit overlimit if remaining 19 updateCountdownAttributes toRemove if remaining 20 toAdd toRemove.filter attr attr is nearlimit .toString..