diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html
index 0724a39ee1..47cc55dff7 100644
--- a/site/layouts/partials/scripts.html
+++ b/site/layouts/partials/scripts.html
@@ -26,7 +26,7 @@
document.querySelectorAll('.btn-edit')
.forEach(function (btn) {
btn.addEventListener('click', function (event) {
- var htmlSnippet = event.target.closest('.bd-content').querySelector('.bd-example').innerHTML
+ var htmlSnippet = event.target.closest('.bd-edit').previousSibling.innerHTML
StackBlitzSDK.openBootstrapSnippet(htmlSnippet)
})