Browse Source

Set the hash to the last clicked item in the FAQ

master
yflory 2 years ago
parent
commit
4edb1c2e0d
2 changed files with 6 additions and 1 deletions
  1. 3
      customize.dist/pages/faq.js
  2. 4
      customize.dist/template.js

3
customize.dist/pages/faq.js

@ -22,6 +22,9 @@ define([
}
$(question).toggleClass('cp-active-faq');
$(answer).slideDown();
var t = $(window).scrollTop();
window.location.hash = hash;
$(window).scrollTop(t);
});
questions.push(h('div.cp-faq-questions-items', [
Pages.setHTML(question, item.q),

4
customize.dist/template.js

@ -54,7 +54,9 @@ $(function () {
} else if (/invite/.test(pathname)) {
require([ '/invite/main.js'], function () {});
} else if (/faq/.test(pathname)) {
window.location.hash = window.location.hash;
var hash = window.location.hash;
window.location.hash = '';
window.location.hash = hash;
} else {
require([ '/customize/main.js', ], function () {});
}

Loading…
Cancel
Save