Guest User

Untitled

a guest
Jan 23rd, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. function agendaChangeDate(append) {
  2. for (property in agendaDateList[agendaDateListLoc]) {
  3. if (agendaDateListLoc != agendaDateList.length - 1 && append == 1) {
  4. $("#prevNavDate").html(agendaDateList[agendaDateListLoc][property]);
  5. } else if (agendaDateListLoc != 0 && append == -1) {
  6. $("#nextNavDate").html(agendaDateList[agendaDateListLoc][property]);
  7. }
  8. }
  9.  
  10. agendaDateListLoc += append;
  11.  
  12. for (property in agendaDateList[agendaDateListLoc + append]) {
  13. if (append == -1) {
  14. $("#prevNavDate").html(
  15. agendaDateList[agendaDateListLoc + append][property]
  16. );
  17. } else {
  18. $("#nextNavDate").html(
  19. agendaDateList[agendaDateListLoc + append][property]
  20. );
  21. }
  22. }
  23.  
  24. if (agendaDateListLoc < 0) agendaDateListLoc = 0;
  25.  
  26. if (agendaDateListLoc == 0) $("#agendaDayBackBtn").hide();
  27. else $("#agendaDayBackBtn").show();
  28.  
  29. if (agendaDateListLoc == agendaDateList.length - 1)
  30. $("#agendaDayNextBtn").hide();
  31. else $("#agendaDayNextBtn").show();
  32. for (property in agendaDateList[agendaDateListLoc]) {
  33. currentAgendaDay = property;
  34. }
  35.  
  36. $('a[id^="dateButton"]').removeClass("active");
  37. $("#dateButton" + currentAgendaDay)
  38. .removeClass("btn-default")
  39. .addClass("active");
  40. var currentDateButtonId = $("#dateButton" + currentAgendaDay)
  41. .prop("id")
  42. .split("dateButton")[1];
  43. $(".fRow").hide();
  44. $("tr[class*=" + currentDateButtonId + "]").fadeIn();
  45. console.log("mde it here");
  46. $("html, body", window.parent.document).animate({ scrollTop: 100 }, "slow");
  47. }
Add Comment
Please, Sign In to add comment