javascript - jquery library needs to be loaded just before the script and conflicts with another library -
i can't figure out how use both javascript codes on same page.
<script id="script" type="text/javascript"> jquery(document).ready(function(){ jquery("#menuzord").menuzord({ align: "right", effect: "slide", animation: "stretch" }); }); </script>
i'm using code menu resize in header on every page. working when i'm using endless_pagination (django) javascript code stops working.
{% block js %} {{ block.super }} <script src="http://code.jquery.com/jquery-latest.js"></script> <script src="/static/endless_pagination/js/endless-pagination.js"></script> <script> $.endlesspaginate({ paginateonscroll: true, paginateonscrollmargin: 20 }); </script> {% endblock %}
if delete library () resizing works endless_pagination not. if leave library there pagination loading not resizing. if load library pagination not working, has loaded before endless-pagination.js. how can resolved both scripts working on same page?
probably in code interfering execution of your
jquery(document).ready()
block.
keep in mind code execute after rest of whole page finish loading (and in case of rest of javascript in page) , executing.
so check javascript console error on pagination code. there breaking javascript execution before menu redimension can start executing.
Comments
Post a Comment