{"id":3059,"date":"2016-01-25T14:19:59","date_gmt":"2016-01-25T14:19:59","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=3059"},"modified":"2016-01-25T14:19:59","modified_gmt":"2016-01-25T14:19:59","slug":"jquery-multiple-version-testing","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/","title":{"rendered":"Testing against multiple jQuery versions"},"content":{"rendered":"<p>I recently took over maintenance of a jQuery UI plugin that lets you <a href=\"http:\/\/garysieling.github.io\/jquery-highlighttextarea\">highlight bits of a textarea<\/a>. Since it&#8217;s a UI plugin, most of the testing is done by visual inspection, and supporting different versions of jQuery presents an interesting testing challenge, since jQuery is one of the first things to load on the page.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/172.104.26.128\/wp-content\/uploads\/2016\/01\/jquery-highlight.png\" alt=\"jquery-highlight\" width=\"705\" height=\"285\" class=\"aligncenter size-full wp-image-3074\" srcset=\"https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2016\/01\/jquery-highlight.png 705w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2016\/01\/jquery-highlight-300x121.png 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/p>\n<p>This is the code that generates the above example:<\/p>\n<pre lang=\"javascript\">\nfunction runTest() {\n  $('#demo1').highlightTextarea({\n      words: {\n        color: '#ADF0FF',\n        words: ['Lorem ipsum','vulputate']\n      },\n      debug: true\n  });\n}\n<\/pre>\n<p>It turns out that you can dynamically add scripts to a page, so rather than including jQuery in a script tag, we can import it after the page loads.<\/p>\n<p>Normally you might use &#8220;$(document).ready&#8221; to run initialization code, but you can use window.onload directly instead:<\/p>\n<pre lang=\"\">\nwindow.onload = loadJavascript;\n<\/pre>\n<p>Inside the runTests function, you need the ability to append a script, and call a callback once it loads, since this is an asynchronous process.<\/p>\n<pre lang=\"javascript\">\nfunction appendScript(src, callback) {\n  var head = document.getElementsByTagName('head')[0];\n\n  var elt = document.createElement(\"script\");\n  elt.type = \"text\/javascript\";\n  elt.src = src;\n\n  elt.onload = function() {\n    callback();\n  }\n\n  head.appendChild(elt);\n}\n<\/pre>\n<p>To make the page load correctly, I&#8217;ve set this up so you can specify the jQuery version on the URL. Once jQuery loads, it triggers jQuery UI loading, and then finally our own scritpts.<\/p>\n<pre lang=\"javascript\">\nfunction loadJavascript() {\n  \/\/ this sets the default\n  var jqv = \"jquery-1.11.1.min.js\";\n\n  try {\n    jqv = window.location.search.split('?')[1].split('=')[1];\n  } catch (e) {}\n\n  appendScript(\"http:\/\/code.jquery.com\/\" + jqv,\n    function() {\n      $('#jqv').val(jqv);\n\n      appendScript(\n        \"http:\/\/code.jquery.com\/ui\/1.10.4\/jquery-ui.min.js\",\n      function() {\n        appendScript(\"..\/jquery.highlighttextarea.js\",\n        runTest\n      )})});\n}\n<\/pre>\n<p>Once this works, you can add a dropdown with all the jQuery versions you want to support, and set the page to refresh when one is selected:<\/p>\n<pre lang=\"javascript\">\nfunction setJQuery(newVersion) {\n  var jqv = $('#jqv').val();\n\n  window.location = 'index.html?jqv=' + jqv;\n}\n<\/pre>\n<p>For completeness, here is the dropdown:<\/p>\n<pre lang=\"javascript\">\n<select id=\"jqv\" onchange=\"setJQuery()\">\n  <option value=\"jquery-2.2.0.js\">jQuery Core 2.2.0<\/option>\n  <option value=\"jquery-2.1.4.js\">jQuery Core 2.1.4<\/option>\n  <option value=\"jquery-2.1.3.js\">jQuery Core 2.1.3<\/option>\n  <option value=\"jquery-2.1.2.js\">jQuery Core 2.1.2<\/option>\n  <option value=\"jquery-2.1.1.js\">jQuery Core 2.1.1<\/option>\n  <option value=\"jquery-2.1.1-rc2.js\">jQuery Core 2.1.1-rc2<\/option>\n  <option value=\"jquery-2.1.1-rc1.js\">jQuery Core 2.1.1-rc1<\/option>\n  <option value=\"jquery-2.1.1-beta1.js\">jQuery Core 2.1.1-beta1<\/option>\n  <option value=\"jquery-2.1.0.js\">jQuery Core 2.1.0<\/option>\n  <option value=\"jquery-2.1.0-rc1.js\">jQuery Core 2.1.0-rc1<\/option>\n  <option value=\"jquery-2.1.0-beta3.js\">jQuery Core 2.1.0-beta3<\/option>\n  <option value=\"jquery-2.1.0-beta2.js\">jQuery Core 2.1.0-beta2<\/option>\n  <option value=\"jquery-2.1.0-beta1.js\">jQuery Core 2.1.0-beta1<\/option>\n  <option value=\"jquery-2.0.3.js\">jQuery Core 2.0.3<\/option>\n  <option value=\"jquery-2.0.2.js\">jQuery Core 2.0.2<\/option>\n  <option value=\"jquery-2.0.1.js\">jQuery Core 2.0.1<\/option>\n  <option value=\"jquery-2.0.0.js\">jQuery Core 2.0.0<\/option>\n  <option value=\"jquery-2.0.0-beta3.js\">jQuery Core 2.0.0-beta3<\/option>\n  <option value=\"jquery-2.0.0b2.js\">jQuery Core 2.0.0-b2<\/option>\n  <option value=\"jquery-2.0.0b1.js\">jQuery Core 2.0.0-b1<\/option>\n  <option value=\"jquery-1.12.0.js\">jQuery Core 1.12.0<\/option>\n  <option value=\"jquery-1.11.3.js\">jQuery Core 1.11.3<\/option>\n  <option value=\"jquery-1.11.2.js\">jQuery Core 1.11.2<\/option>\n  <option value=\"jquery-1.11.1.js\">jQuery Core 1.11.1<\/option>\n  <option value=\"jquery-1.11.1-rc2.js\">jQuery Core 1.11.1-rc2<\/option>\n  <option value=\"jquery-1.11.1-rc1.js\">jQuery Core 1.11.1-rc1<\/option>\n  <option value=\"jquery-1.11.1-beta1.js\">jQuery Core 1.11.1-beta1<\/option>\n  <option value=\"jquery-1.11.0.js\">jQuery Core 1.11.0<\/option>\n  <option value=\"jquery-1.11.0-rc1.js\">jQuery Core 1.11.0-rc1<\/option>\n  <option value=\"jquery-1.11.0-beta3.js\">jQuery Core 1.11.0-beta3<\/option>\n  <option value=\"jquery-1.11.0-beta2.js\">jQuery Core 1.11.0-beta2<\/option>\n  <option value=\"jquery-1.11.0-beta1.js\">jQuery Core 1.11.0-beta1<\/option>\n  <option value=\"jquery-1.10.2.js\">jQuery Core 1.10.2<\/option>\n  <option value=\"jquery-1.10.1.js\">jQuery Core 1.10.1<\/option>\n  <option value=\"jquery-1.10.0.js\">jQuery Core 1.10.0<\/option>\n  <option value=\"jquery-1.10.0-beta1.js\">jQuery Core 1.10.0-beta1<\/option>\n  <option value=\"jquery-1.9.1.js\">jQuery Core 1.9.1<\/option>\n  <option value=\"jquery-1.9.0.js\">jQuery Core 1.9.0<\/option>\n  <option value=\"jquery-1.9.0rc1.js\">jQuery Core 1.9.0-rc1<\/option>\n  <option value=\"jquery-1.9.0b1.js\">jQuery Core 1.9.0-b1<\/option>\n  <option value=\"jquery-1.8.3.js\">jQuery Core 1.8.3<\/option>\n  <option value=\"jquery-1.8.2.js\">jQuery Core 1.8.2<\/option>\n  <option value=\"jquery-1.8.1.js\">jQuery Core 1.8.1<\/option>\n  <option value=\"jquery-1.8.0.js\">jQuery Core 1.8.0<\/option>\n  <option value=\"jquery-1.8rc1.js\">jQuery Core 1.8.0-rc1<\/option>\n  <option value=\"jquery-1.8b2.js\">jQuery Core 1.8.0-b2<\/option>\n  <option value=\"jquery-1.8b1.js\">jQuery Core 1.8.0-b1<\/option>\n  <option value=\"jquery-1.7.2.js\">jQuery Core 1.7.2<\/option>\n  <option value=\"jquery-1.7.2rc1.js\">jQuery Core 1.7.2-rc1<\/option>\n  <option value=\"jquery-1.7rc1.js\">jQuery Core 1.7.0-rc1<\/option>\n  <option value=\"jquery-1.7b2.js\">jQuery Core 1.7.0-b2<\/option>\n  <option value=\"jquery-1.7b1.js\">jQuery Core 1.7.0-b1<\/option>\n  <option value=\"jquery-1.6.4.js\">jQuery Core 1.6.4<\/option>\n  <option value=\"jquery-1.6.4rc1.js\">jQuery Core 1.6.4-rc1<\/option>\n  <option value=\"jquery-1.6.3.js\">jQuery Core 1.6.3<\/option>\n  <option value=\"jquery-1.6.3rc1.js\">jQuery Core 1.6.3-rc1<\/option>\n  <option value=\"jquery-1.6.2.js\">jQuery Core 1.6.2<\/option>\n  <option value=\"jquery-1.6.2rc1.js\">jQuery Core 1.6.2-rc1<\/option>\n  <option value=\"jquery-1.6.1.js\">jQuery Core 1.6.1<\/option>\n  <option value=\"jquery-1.6.1rc1.js\">jQuery Core 1.6.1-rc1<\/option>\n  <option value=\"jquery-1.6.js\">jQuery Core 1.6.0<\/option>\n  <option value=\"jquery-1.6rc1.js\">jQuery Core 1.6.0-rc1<\/option>\n  <option value=\"jquery-1.6b1.js\">jQuery Core 1.6.0-b1<\/option>\n  <option value=\"jquery-1.5.2.js\">jQuery Core 1.5.2<\/option>\n  <option value=\"jquery-1.5.2rc1.js\">jQuery Core 1.5.2-rc1<\/option>\n  <option value=\"jquery-1.5.1.js\">jQuery Core 1.5.1<\/option>\n  <option value=\"jquery-1.5.1rc1.js\">jQuery Core 1.5.1-rc1<\/option>\n  <option value=\"jquery-1.5.js\">jQuery Core 1.5.0<\/option>\n  <option value=\"jquery-1.5rc1.js\">jQuery Core 1.5.0-rc1<\/option>\n  <option value=\"jquery-1.5b1.js\">jQuery Core 1.5.0-b1<\/option>\n  <option value=\"jquery-1.4.4.js\">jQuery Core 1.4.4<\/option>\n  <option value=\"jquery-1.4.4rc3.js\">jQuery Core 1.4.4-rc3<\/option>\n  <option value=\"jquery-1.4.4rc2.js\">jQuery Core 1.4.4-rc2<\/option>\n  <option value=\"jquery-1.4.4rc1.js\">jQuery Core 1.4.4-rc1<\/option>\n  <option value=\"jquery-1.4.3.js\">jQuery Core 1.4.3<\/option>\n  <option value=\"jquery-1.4.3rc2.js\">jQuery Core 1.4.3-rc2<\/option>\n  <option value=\"jquery-1.4.3rc1.js\">jQuery Core 1.4.3-rc1<\/option>\n  <option value=\"jquery-1.4.2.js\">jQuery Core 1.4.2<\/option>\n  <option value=\"jquery-1.4.1.js\">jQuery Core 1.4.1<\/option>\n  <option value=\"jquery-1.4.js\">jQuery Core 1.4.0<\/option>\n  <option value=\"jquery-1.4rc1.js\">jQuery Core 1.4.0-rc1<\/option>\n  <option value=\"jquery-1.4a2.js\">jQuery Core 1.4.0-a2<\/option>\n  <option value=\"jquery-1.4a1.js\">jQuery Core 1.4.0-a1<\/option>\n  <option value=\"jquery-1.3.2.js\">jQuery Core 1.3.2<\/option>\n  <option value=\"jquery-1.3.1.js\">jQuery Core 1.3.1<\/option>\n  <option value=\"jquery-1.3.1rc1.js\">jQuery Core 1.3.1-rc1<\/option>\n  <option value=\"jquery-1.3.js\">jQuery Core 1.3.0<\/option>\n  <option value=\"jquery-1.3rc2.js\">jQuery Core 1.3.0-rc2<\/option>\n  <option value=\"jquery-1.3rc1.js\">jQuery Core 1.3.0-rc1<\/option>\n  <option value=\"jquery-1.3b2.js\">jQuery Core 1.3.0-b2<\/option>\n  <option value=\"jquery-1.3b1.js\">jQuery Core 1.3.0-b1<\/option>\n  <option value=\"jquery-1.2.6.js\">jQuery Core 1.2.6<\/option>\n  <option value=\"jquery-1.2.5.js\">jQuery Core 1.2.5<\/option>\n  <option value=\"jquery-1.2.4.js\">jQuery Core 1.2.4<\/option>\n  <option value=\"jquery-1.2.4b.js\">jQuery Core 1.2.4-b<\/option>\n  <option value=\"jquery-1.2.4a.js\">jQuery Core 1.2.4-a<\/option>\n  <option value=\"jquery-1.2.3.js\">jQuery Core 1.2.3<\/option>\n  <option value=\"jquery-1.2.3b.js\">jQuery Core 1.2.3-b<\/option>\n  <option value=\"jquery-1.2.3a.js\">jQuery Core 1.2.3-a<\/option>\n  <option value=\"jquery-1.2.3.js\">jQuery Core 1.2.3<\/option>\n  <option value=\"jquery-1.2.3b.js\">jQuery Core 1.2.3-b<\/option>\n  <option value=\"jquery-1.2.3a.js\">jQuery Core 1.2.3-a<\/option>\n  <option value=\"jquery-1.2.2.js\">jQuery Core 1.2.2<\/option>\n  <option value=\"jquery-1.2.2b2.js\">jQuery Core 1.2.2-b2<\/option>\n  <option value=\"jquery-1.2.2b.js\">jQuery Core 1.2.2-b<\/option>\n  <option value=\"jquery-1.2.1.js\">jQuery Core 1.2.1<\/option>\n  <option value=\"jquery-1.2.js\">jQuery Core 1.2.0<\/option>\n  <option value=\"jquery-1.1.4.js\">jQuery Core 1.1.4<\/option>\n  <option value=\"jquery-1.1.3.js\">jQuery Core 1.1.3<\/option>\n  <option value=\"jquery-1.1.3a.js\">jQuery Core 1.1.3-a<\/option>\n  <option value=\"jquery-1.1.2.js\">jQuery Core 1.1.2<\/option>\n  <option value=\"jquery-1.1.1.js\">jQuery Core 1.1.1<\/option>\n  <option value=\"jquery-1.1.js\">jQuery Core 1.1.0<\/option>\n  <option value=\"jquery-1.1b.js\">jQuery Core 1.1.0-b<\/option>\n  <option value=\"jquery-1.1a.js\">jQuery Core 1.1.0-a<\/option>\n  <option value=\"jquery-1.0.4.js\">jQuery Core 1.0.4<\/option>\n  <option value=\"jquery-1.0.3.js\">jQuery Core 1.0.3<\/option>\n  <option value=\"jquery-1.0.2.js\">jQuery Core 1.0.2<\/option>\n  <option value=\"jquery-1.0.1.js\">jQuery Core 1.0.1<\/option>\n  <option value=\"jquery-1.0.js\">jQuery Core 1.0.0<\/option>\n<\/select>\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I recently took over maintenance of a jQuery UI plugin that lets you highlight bits of a textarea. Since it&#8217;s a UI plugin, most of the testing is done by visual inspection, and supporting different versions of jQuery presents an interesting testing challenge, since jQuery is one of the first things to load on the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Testing against multiple jQuery versions&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[4,22],"tags":[129,302,313,314,409,413,512,515],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"I recently took over maintenance of a jQuery UI plugin that lets you highlight bits of a textarea. Since it&#039;s a UI plugin, most of the testing is done by visual inspection, and supporting different versions of jQuery presents an interesting testing challenge, since jQuery is one of the first things to load on the\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"gary\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Gary Sieling - Software Engineer\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Testing against multiple jQuery versions - Gary Sieling\" \/>\n\t\t<meta property=\"og:description\" content=\"I recently took over maintenance of a jQuery UI plugin that lets you highlight bits of a textarea. Since it&#039;s a UI plugin, most of the testing is done by visual inspection, and supporting different versions of jQuery presents an interesting testing challenge, since jQuery is one of the first things to load on the\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2016-01-25T14:19:59+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2016-01-25T14:19:59+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Testing against multiple jQuery versions - Gary Sieling\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I recently took over maintenance of a jQuery UI plugin that lets you highlight bits of a textarea. Since it&#039;s a UI plugin, most of the testing is done by visual inspection, and supporting different versions of jQuery presents an interesting testing challenge, since jQuery is one of the first things to load on the\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/jquery-multiple-version-testing\\\/#blogposting\",\"name\":\"Testing against multiple jQuery versions - Gary Sieling\",\"headline\":\"Testing against multiple jQuery versions\",\"author\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/author\\\/gary\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"http:\\\/\\\/172.104.26.128\\\/wp-content\\\/uploads\\\/2016\\\/01\\\/jquery-highlight.png\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/jquery-multiple-version-testing\\\/#articleImage\"},\"datePublished\":\"2016-01-25T14:19:59+00:00\",\"dateModified\":\"2016-01-25T14:19:59+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/jquery-multiple-version-testing\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/jquery-multiple-version-testing\\\/#webpage\"},\"articleSection\":\"Code Examples, Proof of Concepts, css, javascript, jquery, jquery-ui, opensource, oss, software development, software testing\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/jquery-multiple-version-testing\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.garysieling.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/category\\\/code-examples\\\/#listItem\",\"name\":\"Code Examples\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/category\\\/code-examples\\\/#listItem\",\"position\":2,\"name\":\"Code Examples\",\"item\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/category\\\/code-examples\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/jquery-multiple-version-testing\\\/#listItem\",\"name\":\"Testing against multiple jQuery versions\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/jquery-multiple-version-testing\\\/#listItem\",\"position\":3,\"name\":\"Testing against multiple jQuery versions\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/category\\\/code-examples\\\/#listItem\",\"name\":\"Code Examples\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/#organization\",\"name\":\"Gary Sieling\",\"description\":\"Software Engineer\",\"url\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/author\\\/gary\\\/#author\",\"url\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/author\\\/gary\\\/\",\"name\":\"gary\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/jquery-multiple-version-testing\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0be925276d848ffe98a6a9dc8cf33e67?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"gary\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/jquery-multiple-version-testing\\\/#webpage\",\"url\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/jquery-multiple-version-testing\\\/\",\"name\":\"Testing against multiple jQuery versions - Gary Sieling\",\"description\":\"I recently took over maintenance of a jQuery UI plugin that lets you highlight bits of a textarea. Since it's a UI plugin, most of the testing is done by visual inspection, and supporting different versions of jQuery presents an interesting testing challenge, since jQuery is one of the first things to load on the\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/jquery-multiple-version-testing\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/author\\\/gary\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/author\\\/gary\\\/#author\"},\"datePublished\":\"2016-01-25T14:19:59+00:00\",\"dateModified\":\"2016-01-25T14:19:59+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/\",\"name\":\"Gary Sieling\",\"description\":\"Software Engineer\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.garysieling.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Testing against multiple jQuery versions - Gary Sieling","description":"I recently took over maintenance of a jQuery UI plugin that lets you highlight bits of a textarea. Since it's a UI plugin, most of the testing is done by visual inspection, and supporting different versions of jQuery presents an interesting testing challenge, since jQuery is one of the first things to load on the","canonical_url":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/#blogposting","name":"Testing against multiple jQuery versions - Gary Sieling","headline":"Testing against multiple jQuery versions","author":{"@id":"https:\/\/www.garysieling.com\/blog\/author\/gary\/#author"},"publisher":{"@id":"https:\/\/www.garysieling.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"http:\/\/172.104.26.128\/wp-content\/uploads\/2016\/01\/jquery-highlight.png","@id":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/#articleImage"},"datePublished":"2016-01-25T14:19:59+00:00","dateModified":"2016-01-25T14:19:59+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/#webpage"},"isPartOf":{"@id":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/#webpage"},"articleSection":"Code Examples, Proof of Concepts, css, javascript, jquery, jquery-ui, opensource, oss, software development, software testing"},{"@type":"BreadcrumbList","@id":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.garysieling.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog\/category\/code-examples\/#listItem","name":"Code Examples"}},{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog\/category\/code-examples\/#listItem","position":2,"name":"Code Examples","item":"https:\/\/www.garysieling.com\/blog\/category\/code-examples\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/#listItem","name":"Testing against multiple jQuery versions"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/#listItem","position":3,"name":"Testing against multiple jQuery versions","previousItem":{"@type":"ListItem","@id":"https:\/\/www.garysieling.com\/blog\/category\/code-examples\/#listItem","name":"Code Examples"}}]},{"@type":"Organization","@id":"https:\/\/www.garysieling.com\/blog\/#organization","name":"Gary Sieling","description":"Software Engineer","url":"https:\/\/www.garysieling.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.garysieling.com\/blog\/author\/gary\/#author","url":"https:\/\/www.garysieling.com\/blog\/author\/gary\/","name":"gary","image":{"@type":"ImageObject","@id":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/0be925276d848ffe98a6a9dc8cf33e67?s=96&d=identicon&r=g","width":96,"height":96,"caption":"gary"}},{"@type":"WebPage","@id":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/#webpage","url":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/","name":"Testing against multiple jQuery versions - Gary Sieling","description":"I recently took over maintenance of a jQuery UI plugin that lets you highlight bits of a textarea. Since it's a UI plugin, most of the testing is done by visual inspection, and supporting different versions of jQuery presents an interesting testing challenge, since jQuery is one of the first things to load on the","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.garysieling.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/#breadcrumblist"},"author":{"@id":"https:\/\/www.garysieling.com\/blog\/author\/gary\/#author"},"creator":{"@id":"https:\/\/www.garysieling.com\/blog\/author\/gary\/#author"},"datePublished":"2016-01-25T14:19:59+00:00","dateModified":"2016-01-25T14:19:59+00:00"},{"@type":"WebSite","@id":"https:\/\/www.garysieling.com\/blog\/#website","url":"https:\/\/www.garysieling.com\/blog\/","name":"Gary Sieling","description":"Software Engineer","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.garysieling.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Gary Sieling - Software Engineer","og:type":"article","og:title":"Testing against multiple jQuery versions - Gary Sieling","og:description":"I recently took over maintenance of a jQuery UI plugin that lets you highlight bits of a textarea. Since it's a UI plugin, most of the testing is done by visual inspection, and supporting different versions of jQuery presents an interesting testing challenge, since jQuery is one of the first things to load on the","og:url":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/","article:published_time":"2016-01-25T14:19:59+00:00","article:modified_time":"2016-01-25T14:19:59+00:00","twitter:card":"summary_large_image","twitter:title":"Testing against multiple jQuery versions - Gary Sieling","twitter:description":"I recently took over maintenance of a jQuery UI plugin that lets you highlight bits of a textarea. Since it's a UI plugin, most of the testing is done by visual inspection, and supporting different versions of jQuery presents an interesting testing challenge, since jQuery is one of the first things to load on the"},"aioseo_meta_data":{"post_id":"3059","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2023-02-04 16:34:30","updated":"2026-07-06 01:24:44","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.garysieling.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.garysieling.com\/blog\/category\/code-examples\/\" title=\"Code Examples\">Code Examples<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tTesting against multiple jQuery versions\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.garysieling.com\/blog"},{"label":"Code Examples","link":"https:\/\/www.garysieling.com\/blog\/category\/code-examples\/"},{"label":"Testing against multiple jQuery versions","link":"https:\/\/www.garysieling.com\/blog\/jquery-multiple-version-testing\/"}],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/3059"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=3059"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/3059\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=3059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=3059"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=3059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}