高分求翻译,懂jquery的进!
高分求翻译,懂jquery的进!
The Wrong Ways
But I get the feeling that a few less experienced jQuery users are referencing jQuery like this:
http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js
Notice the less specific version number — “1.7″ instead of “1.7.2″.
Or, even worse:
http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
Notice the whole version number — “1″ instead of “1.7″ or “1.7.2″.
Or, worst of all:
http://code.jquery.com/jquery-latest.js
Notice no version number, just a plain reference to the “latest” version, whatever that might be.
So why is it wrong to link to jQuery using one of those last three methods? And is it ever right to do that?