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

Function goByHash

core/deck.core.js:280–294  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

278 };
279
280 var goByHash = function(str) {
281 var id = str.substr(str.indexOf("#") + 1);
282
283 $.each(slides, function(i, $slide) {
284 if ($slide.attr('id') === id) {
285 $.deck('go', i);
286 return false;
287 }
288 });
289
290 // If we don't set these to 0 the container scrolls due to hashchange
291 if (options.preventFragmentScroll) {
292 $.deck('getContainer').scrollLeft(0).scrollTop(0);
293 }
294 };
295
296 var assignSlideId = function(i, $slide) {
297 var currentId = $slide.attr('id');

Callers 1

deck.core.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected