How to work with jQuery and remain agnostic to its version?
<p>We're developing a snippet that is embedded in 3rd party sites, and uses jQuery.</p>

<p>The snippet checks if the site already has jQuery loaded. If so, it uses that library, otherwise it loads our own copy (currently jQuery 1.4.4, we're migrating to the latest soon).</p>

<p>There are breaking changes in jQuery. One such change, for example is the <a href="http://stackoverflow.com/questions/5874652/prop-vs-attr">change in semantics</a> of <code>attr()</code>, and introduction of <code>prop()</code>.</p>

<p>Are there some guidelines to working with jQuery in a way that will be as backward compatible as possible? Even when we migrate to latest, we still want to use an existing jQuery library if it exists instead of loading a new copy, to save load time and resources.</p>
