Set the hash to the last clicked item in the FAQ
This commit is contained in:
parent
ce3fef7e1c
commit
4edb1c2e0d
@ -22,6 +22,9 @@ define([
|
|||||||
}
|
}
|
||||||
$(question).toggleClass('cp-active-faq');
|
$(question).toggleClass('cp-active-faq');
|
||||||
$(answer).slideDown();
|
$(answer).slideDown();
|
||||||
|
var t = $(window).scrollTop();
|
||||||
|
window.location.hash = hash;
|
||||||
|
$(window).scrollTop(t);
|
||||||
});
|
});
|
||||||
questions.push(h('div.cp-faq-questions-items', [
|
questions.push(h('div.cp-faq-questions-items', [
|
||||||
Pages.setHTML(question, item.q),
|
Pages.setHTML(question, item.q),
|
||||||
|
|||||||
@ -54,7 +54,9 @@ $(function () {
|
|||||||
} else if (/invite/.test(pathname)) {
|
} else if (/invite/.test(pathname)) {
|
||||||
require([ '/invite/main.js'], function () {});
|
require([ '/invite/main.js'], function () {});
|
||||||
} else if (/faq/.test(pathname)) {
|
} else if (/faq/.test(pathname)) {
|
||||||
window.location.hash = window.location.hash;
|
var hash = window.location.hash;
|
||||||
|
window.location.hash = '';
|
||||||
|
window.location.hash = hash;
|
||||||
} else {
|
} else {
|
||||||
require([ '/customize/main.js', ], function () {});
|
require([ '/customize/main.js', ], function () {});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user