diff --git a/Doc/tools/sphinxext/static/version_switch.js b/Doc/tools/sphinxext/static/version_switch.js index 363bebf..b057f51 100644 --- a/Doc/tools/sphinxext/static/version_switch.js +++ b/Doc/tools/sphinxext/static/version_switch.js @@ -43,10 +43,14 @@ if (new_url != url) { // check beforehand if url exists, else redirect to version's start page - $.get(new_url, function() { - window.location.href = new_url; - }).error(function() { - window.location.href = 'http://docs.python.org/' + selected; + $.ajax({ + url: new_url, + success: function() { + window.location.href = new_url; + }, + error: function() { + window.location.href = 'http://docs.python.org/' + selected; + } }); } }