Skip to content

Commit

Permalink
AMD support
Browse files Browse the repository at this point in the history
  • Loading branch information
rigon committed Aug 16, 2017
1 parent cad8b79 commit 5a242fa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
10 changes: 10 additions & 0 deletions bootpopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*************************************************************************/

/**
* AMD support: require.js
*/
if(typeof define === "function") {
define(["jquery", "bootstrap"], function() {
return bootpopup;
});
}


function bootpopup(options) {
// Create a global random ID for the form
this.formid = "bootpopup-form" + String(Math.random()).substr(2);
Expand Down
10 changes: 9 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,15 @@ <h1>BootPopup</h1>
<span class="glyphicon glyphicon-download-alt"></span> Download latest
</a>
</p>
<p><small><a href="https://bower.io/search/?q=bootpopup">Available via bower</a></small></p>
<p>
<img src="https://bower.io/img/bower-logo.svg" width="16">
<small><a href="https://bower.io/search/?q=bootpopup">Available via bower</a></small><br>
<img src="https://www.npmjs.com/static/images/touch-icons/favicon-16x16.png">
<small><a href="https://www.npmjs.com/package/bootpopup">Available via npm</a></small><br>
<img src="http://requirejs.org/favicon.png">
<small>AMD support: require.js</small>
</p>
</p>
</div>


Expand Down

0 comments on commit 5a242fa

Please sign in to comment.