Walter Davis wrote in post #1180603:
>>> It's giving me Nan when I wrap the parseInt method around the counter.
>>
>> Check that your spelling of the attribute is correct, note the typo in the
> example. Also, if you want to be extra-careful (just had to deal with
> this
> yesterday) you can go all belt-and-suspenders on it:
>>
>>    parseInt( 0 + counter.data('maximum-length') )
>
> Sorry, left out one more bit here:
>
>   parseInt( 0 + counter.data('maximum-length'), 10 )

It's still giving me NaN, you can try the code if you want on a test 
html form or text area.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/daa8678d1a6f364cf3009153c8a310ac%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to