MCPcopy
hub / github.com/imakewebthings/deck.js / changeHash

Function changeHash

core/deck.core.js:333–342  ·  view source on GitHub ↗
(from, to)

Source from the content-addressed store, hash-verified

331 };
332
333 var changeHash = function(from, to) {
334 var hash = '#' + $.deck('getSlide', to).attr('id');
335 var hashPath = window.location.href.replace(/#.*/, '') + hash;
336
337 removeContainerHashClass($.deck('getSlide', from).attr('id'));
338 addContainerHashClass($.deck('getSlide', to).attr('id'));
339 if (Modernizr.history) {
340 window.history.replaceState({}, "", hashPath);
341 }
342 };
343
344 /* Methods exposed in the jQuery.deck namespace */
345 var methods = {

Callers 1

deck.core.jsFile · 0.85

Calls 2

removeContainerHashClassFunction · 0.85
addContainerHashClassFunction · 0.85

Tested by

no test coverage detected