Guest User

Untitled

a guest
Nov 23rd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. <a class="wst-click update_data" wst-href="{% url 'data:like' content.id %}" href="{% url 'data:like' content.id %}" >{{ data.likes.count }} Like</a>
  2.  
  3. $('.wst-click').click(function(e){
  4. e.preventDefault();
  5.  
  6. var this_ = $(this);
  7. var wstURL = this_.attr('wst-href');
  8.  
  9. $.ajax({
  10. url: wstURL,
  11. method: 'GET',
  12. data: {},
  13. success: function (data) {
  14. $('.update_data').text(data);
  15. }
  16. })
  17. });
Add Comment
Please, Sign In to add comment