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

  • Home
  • SEARCH
  • 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 3241144
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:09:55+00:00 2026-05-17T18:09:55+00:00

So I am using jquery ui dialog like this: $(document).ready(function() { // vytvorenie kurzu

  • 0

So I am using jquery ui dialog like this:

$(document).ready(function() {

    // vytvorenie kurzu
    $('a.openModalBox').click(function(e) {
        var href = $(this).attr('href');
        if ('#/' == href) {
            e.preventDefault();
            $('span.modalBoxContent').dialog({
                modal: true,
                resizable: false,
                title: 'Upozornenie',
                zIndex: 1,
                show: 'fast',
                hide: 'slow',
                width: 600,
                height: 90,
                position: 'middle'
            }).width(600);
        }
    });

});

My HTML looks like this:

<a href="#/" class="next openModalBox lessOpacity">
    Go forward
<span class="modalBoxContent">
    <p style="font-size: .8em; text-align: center;">
            Lorem ipsum.<br />
            Lorem ipsum <a href="/index/index" class="accessible-link">lorem ipsum</a>.
        </p>
</span>
</a>

And the relevant CSS is:

span.modalBoxContent {
    display: none;
}

This works great when there is just a text inside the span.modalBoxContent. but if there is a HTML code, then the span is not completely hidden. In this case (see the above HTML), the link is visible.

How is that possible and how to solve it?

  • 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-17T18:09:55+00:00Added an answer on May 17, 2026 at 6:09 pm

    Write valid HTML.

    A span element cannot contain a p element. In an attempt to recover from the error, your browser is ending the span just before it starts the p and then ignoring the end tag for the span as another error. (a elements are also inline and also unable to hold block level elements such as p)

    Your use of placeholder text makes it difficult to tell what the semantics of the content should be, but you probably should be using something more like:

    <a href="#id_of_related_content">link text</a>
    <div id="id_of_related_content">
        Your initially hidden content here
    </div>
    

    Don’t forget to make the link’s href attribute to point to something sensible.

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

Sidebar

Related Questions

We are developing an application in ASP.Net MVC 3 using jQuery UI Dialog. This
I'm using jQuery's form plugin (as suggested in a number of threads like this
How can I change CSS from javascript . I'm using jQuery-ui Dialog and I
I am using the jquery-ui-dialog plugin I am looking for way to refresh the
I am using SimpleModal in jQuery, and I have one confirm dialog. If the
Using jQuery, how do you bind a click event to a table cell (below,
I'm using JQuery to load the content of an MVC usercontroll: function menuShowModal(a) {
What I am trying to accomplish is using jQuery UI dialog method from my
I am using a jQuery UI dialog but instead of duplicating the dialog setup
I'm trying to create a dialog window using JQuery. I'm making progress so far,

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.