MCPcopy Create free account
hub / github.com/codecombat/codecombat / onClickFixedNavLink

Method onClickFixedNavLink

app/views/AboutView.js:98–104  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

96 }
97
98 onClickFixedNavLink (event) {
99 event.preventDefault() // prevent default page scroll
100 const link = $(event.target).closest('a')
101 const target = link.attr('href')
102 history.replaceState(null, null, `about${target}`) // update hash without triggering page scroll
103 return this.scrollToLink(target)
104 }
105
106 onRightPressed (event) {
107 // Special handling, otherwise after you click the control, keyboard presses move the slide twice

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected