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 8148195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:35:59+00:00 2026-06-06T14:35:59+00:00

I am trying to solve a z-index problem with the jQuery UI Dialog, similar

  • 0

I am trying to solve a z-index problem with the jQuery UI Dialog, similar to question Can't select or deselect checkboxes inside jQuery UI Modal Dialog , knowing there is a bug report out there.

So in trying to up the z-index as recommended, I added the following code:

$('#interface').click(function(evform){
  $('#interface').prop('z-index')=99999;
});

where the chrome and firefox console.log states:

Uncaught ReferenceError: Invalid left-hand side in assignment

HOWEVER, despite the error, the checkbox now works (throwing the console error every time). If I remove the offending line, the checkbox becomes “unclickable”. How can I properly code this?

My HTML:

<div id="dialog" title="Loading...">
    <p id="interface">Loading...</p>
</div>

(by the way, I tried adding inline style to the <p>, and it didn’t work:

<p id="interface" style="z-index:99999">Loading...</p>

And with AJAX, I replace the contents of ‘#interface’ with valid checkbox html such as:

<label for="right">
  <input name="right" type="checkbox">
</label>

and I have the usual jQuery/Dialog UI files included.

One final note, I tried to get creative, since this wasn’t working and manually switch the checkbox by:

if ($(evform.target).prop('type')=="checkbox"){
      $(evform.target).checked;
}

* EDIT UPDATE *

As of December 22, 2013 (the EDGE pre release) of jQuery core, this bug has been fixed. I hope they release the stable version soon (I beleive it will be v1.10)! You can test it in a jfiddle at: http://jsfiddle.net/tj_vantoll/XXGQA/

http://bugs.jqueryui.com/ticket/6267

  • 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-06-06T14:36:00+00:00Added an answer on June 6, 2026 at 2:36 pm

    You have to set the z-index on #dialog, not #interface.

    Your code is throwing an error because you’re trying to assign a value to a function call. So your code should be:

    $('#interface').click(function(evform){
      $('#dialog').css('z-index', 99999);
    });
    

    Or just this on your CSS:

    #dialog { z-index: 99999; }
    

    UPDATE

    This solution is not bullet-proof. The bug report filed for jQueryUI states that the problem happens if the checkboxes have a z-index lower than the overlay below the dialog. jQueryUI seems to be comparing z-indexes in an absolute manner, which goes against the CSS standard (but is understandable, considering a proper comparison would probably be resource-intensive).

    So the actual solution may depend on which elements you’re setting z-index (and position) inside the dialog. To avoid the bug, no not use z-index inside the dialog, or set a value guaranteed to be higher than what will be (dynamically) assigned to the overlay (hence, my 99999 suggestion).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright, here is my problem i'm trying to solve. I have an index page
Ok so perhaps someone can help me with a problem I'm trying to solve.
Trying to solve a problem with templatetags. I have two templatetags: @register.inclusion_tag('directory/_alphabet.html') def alphabet_list(names):
Trying to solve this problem . I would like to learn how the bootstrapper
I'm trying to solve a codechef beginner problem - Enormous Input Test . My
I'm trying to solve the following problem in Redis. I have a list that
I am trying to solve this problem http://www.spoj.pl/problems/PEBBMOV/ . I think I have the
I am trying to solve the following problem with Puppet: I have multiple nodes.
I am trying to solve the following problem: Find the largest palindrome made from
I am trying to solve a problem with a CSS menu where the menu

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.