vadimsva / waitMe

jquery plugin for easy creating loading css3/images animations
http://vadimsva.github.io/waitMe/
MIT License
328 stars 84 forks source link

Wait me not working #4

Closed chlebta closed 9 years ago

chlebta commented 9 years ago

Hello, When using the normal file not thes .min I get this error

setElTop is not defined : setElTop(getTop); line 179: col 7

if (getTop - elH >= 0 && getTop + elH <= cH) {
setElTop(getTop); // at This line

Also why WaitMe doesn't allow javascript to be execute before closing it ? example :

submitHandler: function(form) {
                run_waitMe();
                //th **('.form-horizontal').submit(function(e)** after run-waitMe() is not executed
                //If I add  $('.wrapper').waitMe('hide'); the code will be excuted. 

                $('.form-horizontal').submit(function(e){
                    console.log("insideTheForm");
                    var $form = $(this);
                    e.preventDefault(); //keeps the form from behaving like a normal (non-ajax) html form
                    var url = $form.attr('action');
                    var formData = {};
                    //submit a POST request with the form data
                    $form.find(':input').each(function()
                    {
                        formData[ $(this).attr('name') ] = $(this).val();
                    });
                    //submits an array of key-value pairs to the form's action URL
                    $.post(url, formData, function(response) {
                        //handle successful validation
                        console.log("closeWaitME");
                        $('.wrapper').waitMe('hide');
                       ...
                    }).fail(function(response) {
                        //handle failed validation
                        $('.wrapper').waitMe('hide');
                        console.log("Failed");
                    });
                });
            }
vadimsva commented 9 years ago

Hello, can you test this version https://github.com/vadimsva/waitMe/blob/gh-pages/waitMe.js I never could get this error. Also what browser do you use?

chlebta commented 9 years ago

I'm using firefox

vadimsva commented 9 years ago

Please test on new version 06.05.15