Merge branch 'panel'
This commit is contained in:
commit
821686372c
1
AUTHORS
1
AUTHORS
@ -35,6 +35,7 @@ Thank you!
|
|||||||
* David Thompson
|
* David Thompson
|
||||||
* Daniel Krol
|
* Daniel Krol
|
||||||
* Daniel Neel
|
* Daniel Neel
|
||||||
|
* Dealsy
|
||||||
* Deb Nicholson
|
* Deb Nicholson
|
||||||
* Devan Goodwin
|
* Devan Goodwin
|
||||||
* Derek Moore
|
* Derek Moore
|
||||||
|
@ -17,9 +17,27 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
// The header drop-down header panel defaults to open until you explicitly
|
||||||
|
// close it. After that, the panel open/closed setting will persist across
|
||||||
|
// page loads.
|
||||||
|
|
||||||
|
// Initialise the panel status when page is loaded.
|
||||||
|
if (localStorage.getItem("panel_closed")) {
|
||||||
$("#header_dropdown").hide();
|
$("#header_dropdown").hide();
|
||||||
$(".header_dropdown_up").hide();
|
$(".header_dropdown_up").hide();
|
||||||
$(".header_dropdown_down,.header_dropdown_up").click(function() {
|
}
|
||||||
|
else {
|
||||||
|
$(".header_dropdown_down").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Toggle and persist the panel status.
|
||||||
|
$(".header_dropdown_down, .header_dropdown_up").click(function() {
|
||||||
|
if (localStorage.getItem("panel_closed")) {
|
||||||
|
localStorage.removeItem("panel_closed");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
localStorage.setItem("panel_closed", "true");
|
||||||
|
}
|
||||||
$(".header_dropdown_down").toggle();
|
$(".header_dropdown_down").toggle();
|
||||||
$(".header_dropdown_up").toggle();
|
$(".header_dropdown_up").toggle();
|
||||||
$("#header_dropdown").slideToggle();
|
$("#header_dropdown").slideToggle();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user