Private
Public Access
1
0
Files
rowsandall/rowers/templates/menuscript.html
2018-10-23 10:56:26 +02:00

24 lines
586 B
HTML

<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);
if (state !== null) {
$(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>