Bug Tracker

Opened 7 years ago

Closed 7 years ago

#13988 closed bug (notabug)

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.

Change History (1)

comment:1 Changed 7 years ago by dmethvin

Resolution: notabug
Status: newclosed

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

Note: See TracTickets for help on using tickets.