Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("INPUT.auto-hint, TEXTAREA.auto-hint").focus ->
- if $(this).val() is $(this).attr("title")
- $(this).val ""
- $(this).removeClass "auto-hint"
- $("INPUT.auto-hint, TEXTAREA.auto-hint").blur ->
- if $(this).val() is "" and $(this).attr("title") isnt ""
- $(this).val $(this).attr("title")
- $(this).addClass "auto-hint"
- $("INPUT.auto-hint, TEXTAREA.auto-hint").each ->
- return if $(this).attr("title") is ""
- if $(this).val() is ""
- $(this).val $(this).attr("title")
- else
- $(this).removeClass "auto-hint"
Add Comment
Please, Sign In to add comment