seiflotfy/compatipede — pull request #22 by miketaylr (2014-01-31 19:32:09+00:00)
Title: Add plugin to detect WPTouch (and version).

In the future, when WPTouch actually supports FxOS, we
can tweak the regex to only match for versions lower than
whatever the working version will be.

Some notes to explain the version tests here:

**1.1, 1.2**
* Has `div#wptouch-search `
* Shipped with prototype.js, => `Prototype.Version === '1.5.1'`

**1.3**
* Has `div#wptouch-search`
* Shipped with jQuery 1.2.6, => `jQuery.fn.jquery === '1.2.6'`

**1.4, 1.5, 1.6, 1.7, 1.8**
* Has `div#wptouch-search`
* No longer ships with jQuery, but uses the jQuery that comes with WP. Check for `$.noConflict()` usage, => `typeof window.$wptouch === 'function'`

**1.9**
* Has `div#wptouch-menu`
* Later dot revisions of 1.9.X use `winodw.$wpt` instead of `window.$wptouch` as jQuery aliases: => `typeof window.$wptouch === 'function'`, `typeof window.$wpt === 'function'`

(according to the change log, there were no 2.x releases?)

**3.1.1**
* Has `div#wptouch-search-inner`
* Look for `doBauhausReady === fn` OR `wptouchFdnBaseReady ===fn` (no longer has any jQuery aliases)