diff --git a/index.html b/index.html index f3c325b0..c0e4c31a 100644 --- a/index.html +++ b/index.html @@ -9,11 +9,9 @@ @@ -22,7 +20,6 @@
-
- + @@ -1270,6 +1272,7 @@

Snackbars and toasts (with SnackbarJS)

+

SnackbarJS is the ad-hoc developed plugin to create snackbars and toasts, read more about it on the official page of the project.

@@ -1301,10 +1304,15 @@ (function(){ var $button = $("
< >
").click(function(){ - var html = $(this).parent().html(); - html = cleanSource(html); - $("#source-modal pre").text(html); - $("#source-modal").modal(); + var index = $('.bs-component').index( $(this).parent() ); + console.log(index); + $.get(window.location.href, function(data){ + var html = $(data).find('.bs-component').eq(index).html(); + html = cleanSource(html); + $("#source-modal pre").text(html); + $("#source-modal").modal(); + }) + }); $('.bs-component [data-toggle="popover"]').popover(); @@ -1345,6 +1353,8 @@ + +