exam_detail.js 533 B

123456789101112131415161718
  1. $(function () {
  2. let list_flex = $(".list .list-flex");
  3. Array.from(list_flex).forEach(item => {
  4. let list_item = $(item).find(".list-item");
  5. list_item.click(function () {
  6. if (!$(this).data("href")) {
  7. $(this).find(".p>div").click(function () {
  8. $("#toast").addClass("show")
  9. })
  10. return false;
  11. };
  12. window.location.href = $(this).data("href");
  13. })
  14. if (list_item.length == 1) {
  15. $(item).append(`<div style="visibility:hidden" class="list-item"></div>`);
  16. }
  17. })
  18. })