JSFiddle - React, Tailwind, and code Playground

by RWhitbeck

HTML

<select id="jquery-versions">
    <option value="">---Select a version---</option>
</select>
<div id="selected-version">
<p><strong></strong></p>
<ul>
<li><a></a></li>
<li><a></a></li>
</ul>
</div>

CSS

* {
  font-family: arial, helvetica, sans-serif;
   
}

JavaScript

var versions = [
        '1.6.3',
        '1.6.2',
        '1.6.1',
        '1.6',
        '1.5.2',
        '1.5.1',
        '1.5',
        '1.4.4',
        '1.4.3',
        '1.4.2',
        '1.4.1',
        '1.4',
        '1.3.2'
    ];
var $jqueryVersions = $("#jquery-versions");       
        
    $.each(versions, function(index, version)
    {   
       $jqueryVersions.
           append($("<option></option>", { 'value' : version }).
           text(version)); 
    });
//initialize current version
$("#selected-version").find("strong").text("jQuery " + versions[0] + " Current Release").end()
        .find("li:first a").attr("href", "http://code.jquery.com/jquery-" + versions[0] + ".min.js").text("jQuery " + versions[0]).end()
        .find("li:last a").attr("href", "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-" + versions[0] + "-vsdoc.js").text("jQuery "+ versions[0] + " VSDOC");
$jqueryVersions.bind("change", function() {
    var version = $(this).val();
    var $selectVersion = $("#selected-version");
    $selectVersion.find("strong").text("jQuery " + version).end()
        .find("li:first a").attr("href", "http://code.jquery.com/jquery-" + version + ".min.js").text("jQuery " + version).end()
        .find("li:last a").attr("href", "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-" + version + "-vsdoc.js").text("jQuery "+ version + " VSDOC");
});