Brett
Brett

Reputation: 20049

Is there a way to find out what version of jQuery your plugin needs?

I just wrote my first jQuery plugin and I would like to state what version of jQuery it requires at minimum, but unsure how to know for sure what it requires?

Do I need to go through and look when all of the methods, selectors etc were added or is there an easier way?

Upvotes: 0

Views: 17

Answers (1)

T.J. Crowder
T.J. Crowder

Reputation: 1074385

Do I need to go through and look when all of the methods, selectors etc were added

Yes.

or is there an easier way?

Not really, but sort of: Rather than worrying about being specific, I'd just test with a version that's fairly recent and then say that's the minimum; there's little point in supporting outdated versions of jQuery. The API has been fairly stable for a while; if your plugin works with (say) v1.10.1 and also the current v1.11.2 and ideally also the current v2.1.3, given that v1.10.1 was superceded by v1.10.2 nearly two years ago (July 2013), that's more than far enough back to be supporting.

Upvotes: 1

Related Questions