Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(document).ready(function(){
- var breadcrumbLink = document.getElementsByClassName("sensei-breadcrumb").childNodes, str="a"; // this sets a variable to the hyperlink inside of the breadcrumbs div that takes the user back to the module page
- breadcrumbLink.onclick = function(){
- var moduleCookie = Cookies.set('module-control', 'value');
- }; // when the user clicks on the link a cookie is made with the name module-control and a variable is called moduleCookie
- window.onbeforeunload = function () {
- var moduleCookie = Cookies.set('module-control', 'value');
- } // when the user clicks the back button a cookie is made with the name module-control and a variable is called moduleCookie
- function changediv()
- {
- if ( moduleCookie.length > 0) {
- document.getElementById("") {
- document.getElementById("").setAttribute("id", "module1")
- }
- return Cookies.remove('module-control');
- }
- } // if moduleCookie exists get div by class and change the div id to module1
- )};
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement