help_center.js 865 B

123456789101112131415161718192021222324252627
  1. $('#iframe-main', parent.document).css('height', $('.content').height() + 20)
  2. $('.answer').on('click', function () {
  3. $(this).parent().next().click();
  4. })
  5. $('.problemDetial .answer').each(function () {
  6. var txt = $(this).html();
  7. var count = txt.split(/<br\s*\/?>/).length;
  8. if (count == 1 || count == 2) {
  9. $(this).parent().removeClass('txtEllipsis');
  10. $(this).parent().next().hide();
  11. $(this).off();
  12. }
  13. })
  14. var iframe = $('#iframe-main', parent.document);
  15. function lookAll(obj) {
  16. var parent = obj.parents('.problemItem');
  17. var problemDetial = parent.find('.problemDetial');
  18. problemDetial.toggleClass('txtEllipsis');
  19. var txt = '查看&gt;&gt;';
  20. if (txt.indexOf(obj.html())) {
  21. obj.html('查看>>');
  22. } else {
  23. obj.html('收起>>');
  24. }
  25. iframe.css('height', $('.content').height() + 20)
  26. }