Bug Tracker

Modify

Ticket #6628 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

change HTML to div inside a tag

Reported by: mikis Owned by:
Priority: Milestone: 1.4.3
Component: manipulation Version: 1.4.2
Keywords: html div a Cc:
Blocking: Blocked by:

Description

When attempting to modify the html of a div which inside of an A tag you get a result of extra a tag inside the div.

The bug is only occur in FF (I'm using 3.6)

Here's the example of my code:

<script type="text/javascript" language="javascript">

$(document).ready(function(){

$("#a_tag").html("OK"); $("#div_tag").html("OK"); $("#divanda_tag div").html("Problem");

});

</script> <a id="a_tag"></a> <div id="div_tag"></div> <a id="divanda_tag"><div></div></a>

Change History

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

The markup is invalid. An <a> tag is an inline element but a <div> is a block element.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.