Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Expose Offcanvas Class #17

Merged
merged 1 commit into from
Jul 16, 2015
Merged

Expose Offcanvas Class #17

merged 1 commit into from
Jul 16, 2015

Conversation

yagudaev
Copy link
Contributor

This pull request exposes the Offcanvas class to other Javascript code so it can be invoked on demand. The issue is with dynamically generated html fragment that are not present during page load. I.e. anything that generates HTML dynamically during runtime.

Here is an example use case in React.js, but it will be similar in other frameworks:

module.exports = React.createClass
  displayName: 'App'
  componentDidMount: ->
    @oc = new Offcanvas($(@refs.btnOffcanvas.getDOMNode()))

  componentWillUnmount: ->
    @oc = null

iamphill added a commit that referenced this pull request Jul 16, 2015
@iamphill iamphill merged commit a0df429 into iamphill:master Jul 16, 2015
@iamphill
Copy link
Owner

Thanks! 👍

@yagudaev
Copy link
Contributor Author

Awesome thanks for the great component :). Glad I could help a little.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants