From 2f19c7d111d932a526bce812f1cf37f8a78a644b Mon Sep 17 00:00:00 2001 From: umaircb Date: Tue, 11 Mar 2014 12:50:57 +0000 Subject: [PATCH] add note js --- .../styles/cb_2014/theme/js/main.js | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 upload/admin_area/styles/cb_2014/theme/js/main.js diff --git a/upload/admin_area/styles/cb_2014/theme/js/main.js b/upload/admin_area/styles/cb_2014/theme/js/main.js new file mode 100644 index 00000000..3ee2798d --- /dev/null +++ b/upload/admin_area/styles/cb_2014/theme/js/main.js @@ -0,0 +1,74 @@ + +//like in my previous post, I will set the value of window.onload + +//equals to init and then define it separately + +window.onload = init; + +function init(){ + + for (var i=0; i < localStorage.length; i++){ + + var key = localStorage.key(i); + + if (key.substring(0, 6) === 'sticky'){ //will explain this + + var value = localStorage.getItem(key); + + addStickiesToPage(value); //we will create this one + + } + + } + +} + +// + +//this function will insert the sticky notes to the DOM + +//inside the