Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery - Features you couldn't live without

I was conversing with a fellow coder last night and jQuery came up - he had never come across jTemplates or ever considered something like it may exist...

It got me thinking - how many other incredibly useful features exist in jQuery that aren't being used because perfectly serviceable alternatives exist?

I am hoping this question doesn't get closed - I'm aware it doesn't follow the modern Stack-Overflow QA paradigm, but I think it could form a useful resource and questions like this used to be common, so C#, javascript etc have similar offerings.

I'll start with the obvious:

  • Selectors Need I say more?

  • Appearance Modifiers - Various visual effects that can easily be applied to DOM elements. See here.

  • jQuery UI particularly useful in conjunction with the ThemeRoller. Also many widgets and interactions. So far, I've only used the Dialogue and Slider controls, both performing excellently. See here.

  • .ajax and it's variants (.get(), .load() etc.) - Takes all the pain out of making ajax requests. See here.

  • .live Attach an event handler to all elements matching the selector now and in the future! Genius! See here.

  • jTemplates - Alternative to the jQuery.tmpl() function, this plugin allows you to create powerful html templates for rendering data client-side. See here.

  • qTip2 - Still officially in beta, but this plugin is simply the best for creating tooltips and much much more. See here.

  • Deferred - A clean and sensible way to manage asynchronous code. See here for basic info and further links.

Please add anything I've missed, and I will update my list accordingly.

like image 973
BonyT Avatar asked Nov 04 '22 17:11

BonyT


1 Answers

Chaining
Makes it beautiful (with room for making it a mess, though) and concise. Almost every jQuery method (including plugins) return a jQuery object for chaining unless a better alternative exists (e.g., the dimension methods etc.)

like image 109
jensgram Avatar answered Nov 09 '22 12:11

jensgram