GithubHelp home page GithubHelp logo

morganster / jwaitingmodal Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 21 KB

a jquery plugin for waiting messajes.

License: GNU General Public License v3.0

HTML 24.65% CSS 48.59% JavaScript 26.76%

jwaitingmodal's Introduction

jWaitingModal

a jquery plugin for waiting messajes.

##Features

  • Configurable

##Using import the css and js from de dist directory In your html code make a div with a class and id wm-modal like this

In your javascript code write something like this:

$("#wm-modal").showWmModal('wait a little, our hamsters are working fast as they can... ');
setTimeout(function () {
$("#wm-modal").hideWmModal();
}, 1000);

##Contributing

๐Ÿ˜„Before๐Ÿ˜„ making a pull request do the following steps:

  1. Run gulp
  2. Make sure gulp doesn't return any errors
  3. Open demo/index.html in your favorite browser
  4. Make sure there are no errors in dev console
  5. Make sure all dialogs behave correctly

Setting up the environment:

  1. Install Node.js
  2. Go to your project directory
  3. Run npm install -g gulp
  4. Run npm install

๐Ÿ˜…Hey you should only modify files inside src or test directories!:sweat_smile: Files in the dist directory are generated automatically after running gulp.

##Examples

HTML page example:

<html>
<head>
  <meta charset="utf-8">
  <title>jWaitingModal Demo</title>
   <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <link href="../dist/jWaitingModal.min.css" rel="stylesheet">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <script src="../dist/jWaitingModal.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            console.log("ready!");
            $("#btn-modal").click(function() {
                $("#wm-modal").showWmModal();
                setTimeout(ocultar, 2000);

                function ocultar() {
                    $("#wm-modal").hideWmModal()
                }
            });
        });
    </script>
</head>

<body>
    <div class="container">
        <div class="row">
            <div class="col-md-8 col-md-offset-2">
                <button id="btn-modal" class="btn form-control btn-success">show modal</button>
                <div id="wm-modal" class="wm-modal"></div>
            </div>
        </div>
    </div>

</body>

</html>

jwaitingmodal's People

Contributors

morganster avatar

Stargazers

Juan Gabriel Gutierrez avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.