Question

I am using this Plugin in order to block the UI when <input type="submit"> is clicked. However I don't want to block UI immediately, but 2 seconds later.

The following function doesn't work because $('#processingData') cannot be found, although I have defined <h3 id="ProcessingData" style="display:none">Processing Data...</h3> in the html body.

$(function() {
    $('input[type=submit]').click(function() {
        setTimeout(function() {
            $.blockUI({ 
                message: $('#processingData')
            }); 
        }, 2000);
    });
});
Was it helpful?

Solution

Dunno if this is just a typo in your question, but processingDataand ProcessingData is not the same. Notice the capital P at the beginning.

And shouldn't it be

message: $('#ProcessingData').text()

?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top