document.getElementById("title").textContent = demo.title ? demo.title : "";
demo.innerDiv.className = "selected";
Gallery.workareaChild.id = id;
- location.hash = id;
+ location.hash = "g/" + id;
Gallery.workareaChild.innerHTML='';
if (demo.setup) {
demo.setup(Gallery.workareaChild);
Gallery.hashChange = function(event) {
if (location.hash) {
- var id = location.hash.substring(1) + "-toc";
- var elem = document.getElementById(id);
- elem.onclick();
+ if (location.hash.indexOf("#g/") == 0) {
+ var id = location.hash.substring(3) + "-toc";
+ var elem = document.getElementById(id);
+ elem.onclick();
+ }
}
};
\ No newline at end of file