Skip to main content

Bug Tracker

Side navigation

#13988 closed bug (notabug)

Opened June 04, 2013 08:41PM UTC

Closed June 04, 2013 09:42PM UTC

display property override on dynamically generated HTML

Reported by: sylvain courcoux Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:
Description

Hi,

I have the following HTML/CSS:

<div id="TheWrapper" class="WrapperDiv"></div>

.WrapperDiv {

width:200px;

background:red;}

#TheDataContainer{display:none;}

#TheWrapper{display:none;}

I run the following javascript:

$(document).ready(function () {

$('#TheWrapper').prepend('<div id="ThePanel"></div>');

$('#ThePanel').html('<div id="TheDataContainer"></div>');

//does not override the display:none property

$('#TheDataContainer').html('<div>some text</div>').show();

overrides the display:none property

$('#TheWrapper').show();

});

The jsFiddle is here: http:jsfiddle.net/y79fc/2/

I think I should be able to see "some text" no? Let me know.

sylvain.

Attachments (0)
Change History (1)

Changed June 04, 2013 09:42PM UTC by dmethvin comment:1

resolution: → notabug
status: newclosed

Please ask for help on a forum or StackOverflow, in particular regarding CSS cascade.