How can I compare two jQuery versions?

How can I compare two jQuery versions?

Hi,

I develop a plugin which takes the jQuery information on page, and if it doesn't exist or below X version, load the proper version.

  1. if ( parseFloat( this.version ) < 1.4)
  2.     // Do something

It works fine, BUT, when I try it with jQuery version 1.10.2, script fails. Because 1.4 > 1.10.2 when you compare floats.

I don't know what is a proper way to solve it. Any ideas?