Skip to content

Cryde/jquery-modal-as-module-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example

To run this exemple :

npm install
npm run build:dev
It will start brunch as a watcher

npm run build:prod
Will minified js and css into public/app.js and public/app.css

Pay attention that in the package.json I use my own repo.
It's only for test purpose.

Check the app/app.js
With the little patch added to jquery-modal you can now use it as a module.

var $ = require('jquery');
require('jquery-modal');

$(function () {

  // DUMMY TEST
  $('#learn-more').click(function(e){
    e.preventDefault();

    $.get('ajax.html', function(html) {
      $(html).appendTo('body').modal();
    });
  });
});

Like that you won't add jQuery to the global scope

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published