🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

SetNumber is a tiny jQuery plugin that displays line numbers on the left hand side of your textarea element.

Textarea line-number

Documentation

SetNumber jQuery Plugin

Build Status

:set number for textarea

  • Scroll Event support
  • Active line highlight

set-number

Requirements

Usage

$("#id").setNumber({   activeLine:   1 , activeClass:  "active" , wrapperClass: "set-number" }); 
// with jquery-autosize $("#id").autosize({   callback: function(textarea) {     $(textarea).scroll();   } }); 

see also example/index.html

Development

% npm install grunt  # uglify % grunt uglify #=> dist/set-number.min.js will be generated  # stylus % grunt stylus #=> dist/set-number.css will be generated  # test % grunt qunit # or see `test/set-number.html` via browser 

Histroy

  • 20140131 Add stylus compile task (for dist/set-number.css) and sample.html
  • 20140130 Initial Release (0.0.1)

Lincense

MIT License (see LICENSE)


You May Also Like