aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucifer <[email protected]>2019-12-13 10:29:50 +0530
committerLucifer <[email protected]>2019-12-13 10:29:50 +0530
commita86d1a4a905a53c628e8b93c09a4525e795ba45d (patch)
treea267142760938ff9909f4a0f309cb356d7f1bf3b
parent5aef1c9e8980ef3daadc8acd70dadedd6ab02887 (diff)
downloadnativekit-a86d1a4a905a53c628e8b93c09a4525e795ba45d.tar.xz
nativekit-a86d1a4a905a53c628e8b93c09a4525e795ba45d.zip
Added Dropdown toggle function
-rw-r--r--scripts/nativekit.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/nativekit.js b/scripts/nativekit.js
index ffea5f8..846822d 100644
--- a/scripts/nativekit.js
+++ b/scripts/nativekit.js
@@ -1 +1,7 @@
-console.log("Hello World! This app is built using NativeKit") \ No newline at end of file
+// Dropdown Toggle
+
+document.querySelector('.button-dropdown').addEventListener('click', function () {
+ var element = this
+ var id = element.getAttribute('name')
+ document.getElementById(id).classList.toggle("showDropdown");
+}, false);