script to open/close menu
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% extends "newbase.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
xo
|
||||
|
||||
{% block title %}Rowsandall Workouts List{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
|
||||
@@ -93,3 +93,5 @@
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'menuscript.html' %}
|
||||
|
||||
@@ -22,3 +22,5 @@
|
||||
</li>
|
||||
</ul><!-- cd-accordion-menu -->
|
||||
|
||||
|
||||
{% include 'menuscript.html' %}
|
||||
|
||||
@@ -160,3 +160,5 @@
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'menuscript.html' %}
|
||||
|
||||
@@ -53,3 +53,5 @@
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'menuscript.html' %}
|
||||
|
||||
@@ -54,3 +54,5 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul> <!-- cd-accordion-menu -->
|
||||
|
||||
{% include 'menuscript.html' %}
|
||||
|
||||
@@ -92,3 +92,4 @@
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% include 'menuscript.html' %}
|
||||
|
||||
@@ -300,3 +300,5 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul><!-- cd-accordion-menu -->
|
||||
|
||||
{% include 'menuscript.html' %}
|
||||
|
||||
@@ -62,3 +62,5 @@
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% include 'menuscript.html' %}
|
||||
|
||||
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