Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3480902
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:23:46+00:00 2026-05-18T10:23:46+00:00

I need to implement jquery blockUI for my application.. I have this code.. $.blockUI({

  • 0

I need to implement jquery blockUI for my application.. I have this code..

 $.blockUI({ css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#000', 
            '-webkit-border-radius': '10px', 
            '-moz-border-radius': '10px', 
            opacity: .5, 
            color: '#fff' 
        } }); 

        setTimeout($.unblockUI, 2000); 
    }); 

I am keeping this code in each click function in my views.. then it working fine. but I need to make this code centralized that is keeping this code in master file if something is taking more than 2000 milliseconds can I show do jQuery BlockUI? for my entire application. if so please can any one help me out how to keep this code in master page what kind of code I need to implement in master page to access this jQuery blockUI?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:23:47+00:00Added an answer on May 18, 2026 at 10:23 am

    I do this way:

    In the masterpage I have added the script reference and a reference to a custom script where I have the following code

    //Set Defaults values for blockUI
    $.blockUI.defaults.theme = true;
    $.blockUI.defaults.title = 'Please wait...';
    $.blockUI.defaults.message = '<img src="_assets/images/blockUI_Loader.gif" />';
    $.blockUI.defaults.css = {};
    $.blockUI.defaults.themedCSS = {};
    $.blockUI.defaults.themedCSS.width = 100;
    $.blockUI.defaults.themedCSS.height = 64;
    $.blockUI.defaults.overlayCSS = {};
    $.blockUI.defaults.overlayCSS.backgroundColor = '#ffffff';
    $.blockUI.defaults.overlayCSS.opacity = 0.6; 
    

    Then when I have to use it in ajax calls I simply use

    $("#element").block();
    $.ajax({
        type: "get",
        dataType: "html",
        url: "some/url",
        data: {},
        success: function (response, status, xml) {
            $("#element").unblock();
        },
        error: function (response) {
            $("#element").unblock();
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to implement Spell Check for my application using jquery, Please can anyone
I need to implement a regular expression in my asp.net mvc(C#) application using jquery.
I am currently trying to implement this into my current code: http://cubiq.org/iscroll I have
I need help I am new to jQuery and i want to implement jQuery
I need to implement an expanding/collapsing box in jQuery UI. When collapsed, only the
I am trying to implement this jQuery auto complete function but the problem is
I need to implement a Checkbox tree and I came across this component called
I need to implement a Facebook-style multiple image uploader in my PHP application. It
I need some help to implement this roll over / out effect. This is
I need to implement the following functionality in JavaScript/jQuery and its driving me nutts.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.