script to open/close menu
This commit is contained in:
21
rowers/templates/menuscript.html
Normal file
21
rowers/templates/menuscript.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<script
|
||||
type='text/javascript'
|
||||
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$(".has-children").each(
|
||||
function(i, obj) {
|
||||
var theid = $(this).attr('id');
|
||||
var state = localStorage.getItem(theid);
|
||||
$(this).find('input:first').prop("checked",state);
|
||||
});
|
||||
});
|
||||
$(function() {
|
||||
$(".has-children").click( function() {
|
||||
var theid = $(this).attr('id');
|
||||
var state = $(this).find('input:first').is(':checked');
|
||||
localStorage.setItem(theid,state);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user