Guest User

Untitled

a guest
Apr 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. $.getJSON({
  2. url: recent_nodes_journey_thought_guide_path($.journey()),
  3. data: { offset: recentNodesCount },
  4. error: function(xhr) {
  5. $('#errorDisplay')
  6. .appendTo('Error: ' + xhr.status + ' ' + xhr.statusText);
  7. },
  8. success: function(responseBody) {
  9. $('.recent_nodes_more').remove();
  10. for (var i=0; i < responseBody.length; i++) {
  11. $('<li><a href="">' + responseBody[i] + '</a></li>')
  12. .appendTo($('.recent_nodes ul'));
  13.  
  14. };
  15. $('<li><a href="" class="recent_nodes_more">More</a></li>')
  16. .appendTo($('.recent_nodes ul'));
  17. $('.recent_nodes_more').click(function() {
  18. $.moreRecentNodes();
  19. return false;
  20. });
  21. }
  22. });
Add Comment
Please, Sign In to add comment