Skip to content

Instantly share code, notes, and snippets.

@rightx2
Created May 1, 2017 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rightx2/5a8b4f8820a52eb31f36b84ae2692d79 to your computer and use it in GitHub Desktop.
Save rightx2/5a8b4f8820a52eb31f36b84ae2692d79 to your computer and use it in GitHub Desktop.
// my_list.html
{% extends "skeleton/base.html" %}
{% load el_pagination_tags %}
{% block custom_stylesheet %}
{% endblock %}
{% block content %}
{% include page_template %}
{% endblock %}
{% block custom_js %}
<script src="{% static 'el-pagination/js/el-pagination.js' %}"></script>
<script>
$.endlessPaginate({
paginateOnScroll: true,
paginateOnScrollMargin: 50
});
</script>
{% javascript "clien" %}
<script>
$('.like').change(function() { // ajax로 새로이 load되는 element들에는 작동이 안함!
alert(checked);
})
</script>
{% endblock %}
// my_list_page.html
{% load el_pagination_tags %}
<div>
{% for post in posts %}
<div>{{ post }}</div>
<input class="like">
{% endfor %}
</div>
{% show_more %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment