The JavaScript on my website doesn't seem to be working at all, since I started using the extend feature, using a base.html file to store the nav bar and footer. I really really can't work out why it isn't working. The css is working absolutely fine, just no javascript. Does anyone have any advice on this??
I have included the code from 1) base.html, 2) the extendedpage.html, and 3) part of the js function.... I hope this is enough info. The element that the javascript works on is inside a block content above this. I just cant work out what I am doing wrong, and I plan on actually using this website for stuff so I dont want to have to reprint the footer and navbar on every single html page.
TIA
{% block scripts %}
<!-- JS Global Compulsory (Do not remove)-->
<script type="text/javascript" src="{{ url_for('static', filename='/js/jquery-3.4.1.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='/js/popper/popper.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='/js/bootstrap/bootstrap.min.js') }}"></script>
{% endblock scripts %}
{% endblock body %}
</body>
{% endblock html %}
</html>
{% endblock doc %}
{% endblock content %}
{% block scripts %}
{{ super() }}
<!-- Page JS Implementing Plugins (Remove the plugin script here if site does not use that feature)-->
<script type="text/javascript" src="{{ url_for('static', filename='/js/jquery.appear.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='/js/counter/jquery.countTo.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='/js/range-slider/ion.rangeSlider.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='/js/owl-carousel/owl.carousel.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='/js/jarallax/jarallax.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='/js/jarallax/jarallax-video.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='/js/magnific-popup/jquery.magnific-popup.min.js') }}"></script>
<!-- Template Scripts (Do not remove)-->
<script type="text/javascript" src="{{ url_for('static', filename='/js/custom.js') }}"></script>
{% endblock scripts %}
POTENZA.rangesliders = function () {
if ($('.property-price-slider').exists()) {
var rangeslider = jQuery(".rangeslider-wrapper");
$("#property-price-slider").ionRangeSlider({
type: "double",
min: 0,
max: 10000,
from: 1000,
to: 8000,
prefix: "$",
hide_min_max: true,
hide_from_to: false
});
}
};