В общем сделал через location.hash, иных способов пока не нашел
Кусочек кода.
var blackCatRequest = {
wrap: document.getElementById("wrap-request"),
button: document.getElementById("button-send-request"),
show: function (event) {
event.preventDefault();
blackCatFunc.showBlockElement(blackCatRequest.wrap);
window.location.hash = 'request';
},
hide: function (event) {
event.preventDefault();
event = blackCatDOM.fixEvent(event);
if (event.target === event.currentTarget) {blackCatFunc.hideElement(blackCatRequest.wrap); }
},
};
var blackCatInit = {
mobileInit: function () {
console.log("touch");
blackCatRequest.button.addEventListener("touchstart", blackCatRequest.show);
blackCatRequest.wrap.addEventListener("touchstart", blackCatRequest.hide);
},
desktopInit: function () {
console.log("click");
blackCatRequest.button.addEventListener("click", blackCatRequest.show);
blackCatRequest.wrap.addEventListener("click", blackCatRequest.hide);
document.addEventListener("mousemove", blackCatWWW.moveBg);
},
init: function () {
if (blackCatFunc.isMobile.any() === null) {
this.desktopInit();
} else {this.mobileInit(); }
window.onhashchange = function () {
if (location.hash !== "#request") {blackCatFunc.hideElement(blackCatRequest.wrap); }
if (location.hash === "#request") {blackCatFunc.showBlockElement(blackCatRequest.wrap); }
};
}
};
blackCatInit.init();