• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Extending JQuery

 
paul nisset
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What are the benefits of extending JQuery ?

For example do you have an use case that extending JQuery might solve ?

Thanks,
Paul
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64615
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't think of a single project where I haven't extended jQuery in some way. Whether it's to create my own widgets, calculate values, keep track of state, or a whole plethora of other things. Being able to build upon core jQuery, rather than rolling your own every time, makes for much more compact and error-free code.

And, of course, I use a lot of other people's plugins in my code as well. Last evening, in fact, I found and added a "time picker" plugin to my project.
 
paul nisset
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's been around for a while so that is a good point.
Thanks.
 
Keith Wood
Author
Ranch Hand
Posts: 38
jQuery
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The extent of the plugin community shows that there are lots of reasons to extend jQuery. When you create a plugin you can encapsulate a piece of functionality in a way that is easily reusable. You gain the benefits of consistency of appearance and behaviour across your entire Web site, and reduced maintenance as there is only a single piece of code to test.
 
paul nisset
Ranch Hand
Posts: 225
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



That's a great reason.
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic