From: Charles Holbrow Date: Thu, 21 Mar 2013 16:54:36 +0000 (-0400) Subject: adding js script to detect arrival at course-detail page with #add-note fragment X-Git-Tag: release-20150131~484 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=406f4a207d24df3af11b5d9eb911a2cdd987a9c3;p=oweals%2Fkarmaworld.git adding js script to detect arrival at course-detail page with #add-note fragment --- diff --git a/karmaworld/assets/js/course-addNote.js b/karmaworld/assets/js/course-addNote.js new file mode 100644 index 0000000..0433394 --- /dev/null +++ b/karmaworld/assets/js/course-addNote.js @@ -0,0 +1,8 @@ +if(window.location.hash) { + + // Get the first hasgh, remove the # character + var hash = window.location.hash.substring(1); + if (hash === 'add-note'){ + alert('Adding a note!'); + } +} diff --git a/karmaworld/templates/courses/course_detail.html b/karmaworld/templates/courses/course_detail.html index f0e18eb..47e62dd 100644 --- a/karmaworld/templates/courses/course_detail.html +++ b/karmaworld/templates/courses/course_detail.html @@ -6,6 +6,7 @@ +