We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b45751c commit 8fbf75cCopy full SHA for 8fbf75c
js/toggleExample.js
@@ -0,0 +1,10 @@
1
+(function () {
2
+ var allExamples = document.querySelectorAll('.toggleExample'),
3
+ toggleHandler = function (el) {
4
+ document.getElementById(this.id+'Example').classList.toggle('hide');
5
+ };
6
+
7
+ for (var i = allExamples.length - 1; i >= 0; i--) {
8
+ allExamples[i].addEventListener('click', toggleHandler);
9
10
+})();
0 commit comments