onnxruntime/_static/versions.js
Xavier Dupré 2d85714183 First version of the documentation (#312)
* clear branch

* First version of the documentation on github
2019-01-11 11:08:33 -08:00

22 lines
860 B
JavaScript

"use strict";
// get all of the releases from versions.json, and use these to populate the
// dropdown menu of different releases
$(document).ready(function () {
// Define versions_json_url in versions.html through a template variable
$.getJSON(versions_json_url)
.done(function (data) {
$.each(data.sort(function (a, b) {
return a.version > b.version
}), function (i, item) {
$('<li class="list-inline-item version">').append(
$("<a>").text(item.display).attr('href', item.url)
).appendTo("#other-versions");
});
})
.fail(function (d, textStatus, error) {
console.error("getJSON failed, status: " + textStatus + ", error: " + error);
});
});
console.log("Loading versions from " + versions_json_url);