jQuery growfield

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-12 21:26:46

软件介绍

Style-independent cross-browser jQuery textarea autogrow plugin

Successfully tested in: FF2 (vista, xp, mac, linux), IE6 (xp), IE7 (vista, xp), Opera 9.2 (xp, mac), Opera 9.5 (vista), Safari 3 (mac, xp).

Comments and fixes are very appreciated.
optional parameters // $(elem).growfield( options )

* auto - bool // default = true // if false, ctrl + up/down are enabled
* animate - bool // default = true
* before(jEvent), after(jEvent) - callbacks // 'this' will be the dom object
* min - integer - height in pixels // default = min ? css.min-height || initial height
* max - integer - height in pixels // maximum size // default = css.max-height || none
* restore - bool - restore original size on blur (and back to growed on focus) // default = false
* speed - integer - animation speed. not a jquery parameter // default = 300 (ms)

additional functions (public interface)

* $(..).increase( step )
* decrease( step )
* growTo( height )
* growToggleAuto( bool )
* growToggleRestore( bool )
* growSetMin( integer )
* growSetMax( integer )

notes

parameters may be set in html attributes // tag attributes have priority

increase and decrease functions are working only in auto mode
opera:

in opera, if you don't have border style for textarea, plugin will set it (opera hides borders in overflow:hidden mode). in auto mode it won't work at all. More than that, opera returns border:2px solid #00000 even if you don't set it. :(
known problems:

after restore (onfocus) with animation textarea sometimes looses cursor. :( // ff2, ie7xp

when reached maximum height, opera will jitter on every keydown :( // opera < 9.5
ctrl + up/down:

in opera and ie this shortcut doesn't work properly. But you may use ctrl + whatever + up/down.

Download here:
http://code.google.com/p/jquery-growfield/downloads/list

本文地址:https://codercto.com/soft/d/23250.html

JavaScript开发王

JavaScript开发王

张亚飞 / 2008-6 / 65.00元

《网站开发专家·JavaScript开发王》详细介绍使用JavaScript脚本开发应用程序,并融合在网页中实现动态网页,内容也包含DHTML和AJAX。这《网站开发专家·JavaScript开发王》有严格的逻辑性,不论是JavaScript语言、DHTML,还是AJAX,《网站开发专家·JavaScript开发王》首先帮助用户建立首要的、基础的正确认知,然后通过实例,说明如何利用JavaScri......一起来看看 《JavaScript开发王》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

MD5 加密
MD5 加密

MD5 加密工具