JQuery Tips

Note: you need to install the jquery.d.ts file for these tips

Quickly define a new plugin

Just create jquery-foo.d.ts with:

  1. interface JQuery {
  2. foo: any;
  3. }

And now you can use $('something').foo({whateverYouWant:'hello jquery plugin'})