Advertisement
sanjiisan

Untitled

Jun 10th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. $(function () {
  2.  
  3. var showbtn = $('.show-dates-btn');
  4. showbtn.on('click', function () {
  5.  
  6. var that = this;
  7.  
  8. $
  9. .ajax({
  10. url: 'seans.json',
  11. dataType: 'json'
  12. })
  13. .done(function (response) {
  14. var list = $('.ticket');
  15.  
  16. for (var i = 0; i < response.length; i++) {
  17. var newListElement =
  18. $("<li>" + response[i].date + " " + response[i].time + "</li>");
  19.  
  20. list.append(newListElement);
  21. }
  22.  
  23. list.slideDown();
  24. })
  25. .fail(function (error) {
  26. console.log(error);
  27. });
  28. });
  29. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement