Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <a class="wst-click update_data" wst-href="{% url 'data:like' content.id %}" href="{% url 'data:like' content.id %}" >{{ data.likes.count }} Like</a>
- $('.wst-click').click(function(e){
- e.preventDefault();
- var this_ = $(this);
- var wstURL = this_.attr('wst-href');
- $.ajax({
- url: wstURL,
- method: 'GET',
- data: {},
- success: function (data) {
- $('.update_data').text(data);
- }
- })
- });
Add Comment
Please, Sign In to add comment