Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
iasinov committed Mar 11, 2016
1 parent 9037a1a commit 4c73103
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# sf-module-popup

Popup module
# Popup module for sf.js

## Usage Example
```html
Expand All @@ -20,6 +18,35 @@ Popup module
* **data-delimiters** - Delimiters to parse variables in template *Default: "{{,}}"*
* **data-response-data-name** - Object name with Data fetched from server with data-url *Default: "data"*
* **data-response-template-name** - Object name with template fetched from server with data-url *Default: "template"*

## Events
* **show** - is being triggered on each popup opening
* **hide** - is being triggered on each popup closing

#### Usage Example
```javascript
var popup = sf.addInstance("popup", document.getElementById('js-custom-popup'));

popup.events.on("show", function (options) {
...
});
popup.events.on("hide", function (options) {
...
});
```

## Methods
* **getContentNode** - returns modal-node where content is meant to be passed

#### Usage Example
```javascript
var popup = sf.addInstance("popup", document.getElementById('js-custom-popup'));

popup.getContentNode().innerHTML="<h1>Hello, World!</h1>";
```




## Local Development

Expand Down

0 comments on commit 4c73103

Please sign in to comment.