From 161cf358847b4429b9583b72dcf4411c881fddca Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Wed, 6 Dec 2017 15:03:11 -0500 Subject: [PATCH] website: Fix Vagrant Cloud API examples When using Turbolinks to navigate between docs pages, the document ready event never fired and all language examples were shown. This should fix the issue without needed a refresh/example menu click. --- website/source/docs/vagrant-cloud/api.html.md.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/source/docs/vagrant-cloud/api.html.md.erb b/website/source/docs/vagrant-cloud/api.html.md.erb index 3558322b9..cdc303aab 100644 --- a/website/source/docs/vagrant-cloud/api.html.md.erb +++ b/website/source/docs/vagrant-cloud/api.html.md.erb @@ -13,9 +13,9 @@ sidebar_current: "vagrant-cloud-api" $(".examples pre.highlight." + language).show(); } - $(document).ready(function() { - setExampleLanguage("shell"); } - ); + $(document).on('ready turbolinks:load', function() { + setExampleLanguage("shell"); + });