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

Constructor Details

- (void) constructor(element)

Construct a new Close instance

Parameters:

  • element (Object) HTMLElement on which we will try to close

Instance Method Details

- (void) close()

Close the element - Removes this.$target element and triggers 'close' event