Any reason not to use $(test).stuff(); vs test.stuff(); given that test = $('something');?

Viewed 198

Google isn't helping me figure this one out. Is there any reason not to do the following:

var test = $('something');
$(test).stuff();

Instead of the doing it this way:

var test = $('something');
test.stuff();

Basically I find the code much easier to read when it's in the jQuery selector format, even though it doesn't need to be.

Both methods appear to work the same.

Thanks!

5 Answers
Related