jQuery isn't a separate language with its own rules. It's still JavaScript
code, just like any other JavaScript code. Functions, variables, reusable
code, those are all good practice, and none of it changes because you're
using jQuery.

Could you give a specific example of some jQuery code that doesn't look
good, and then we can talk about how to clean it up?

-Mike

> From: Will
> 
> I'm sure this is dealt with somewhere in the jQuery tutorials 
> but I have not been able to find it.
> 
> I'm new to jQuery and used to working with functions and 
> variables so that I can create reusable code and not have to 
> hard code every event that could happen.  This is pretty much 
> basic programming.  For Example,
> 
> function action(id) {
>      //do something.....
> }
> 
> Short of using this method of traditionally programming is 
> there a better way of doing this in jQuery?

Reply via email to