exam_detail_img.js 823 B

12345678910111213141516171819
  1. $(function () {
  2. // const globaldata = {
  3. // };
  4. $(".my-nav").click(function (e) {
  5. let active = Array.prototype.slice.call($(this).find("li")).indexOf(e.target);
  6. if (active == globaldata.active) return false;
  7. globaldata.active = active;
  8. $(this).find(".active").removeClass("active");
  9. $(e.target).addClass("active");
  10. })
  11. $("[data-click='open']").click(function () {
  12. let bool = $(this).data("open");
  13. if (!bool) {
  14. $(this).data("open", true).children("i").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up").parent().parent().parent().addClass("edi-body-height");
  15. } else {
  16. $(this).data("open", false).children("i").removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down").parent().parent().parent().removeClass("edi-body-height");
  17. }
  18. })
  19. })