Class: Close
Defined in: | tbg-close.js.coffee |
Overview
CLOSE CLASS DEFINITION
Examples:
How to use the class
closeInstance = new Close $('.my-element')
# Close element
closeInstance.close()
How to use the class with jQuery
$('.my-element').close('close')
How to ensure plugin self initialises on element
<div data-close> Close me </div>
Instance Method Summary
- - (void) constructor(element) Constructor Construct a new Close instance
- - (void) close() Close the element - Removes this.$
Constructor Details
- (void) constructor(element)
Construct a new Close instance
Instance Method Details
- (void) close()
Close the element - Removes this.$target element and triggers 'close' event