-
-
Save lessless/c8ab7927e6708341c48f to your computer and use it in GitHub Desktop.
zurb reveal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
toggleDialog: function() { | |
if (this.get('display') === true) { | |
this.send('showModal'); | |
} | |
else { | |
this.send('closeModal'); | |
} | |
}.observes('display'), | |
modalId: function() { | |
return Ember.guidFor(this + 'modal'); | |
}.property(), | |
actions: { | |
showModal: function() { | |
let modalId = '#' + this.get('modalId'); | |
this.$(modalId).foundation('reveal', 'open'); | |
}, | |
closeModal: function() { | |
let modalId = '#' + this.get('modalId'); | |
Ember.$(modalId).foundation('reveal', 'close'); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment