</div> transformed to </button>

98 Views Asked by At

I'm writing Android app (single page application), using Visual Studio tools for Cordova and Ratchet bootstrap. After injecting new HTML into page, my </div> tag mysteriously transformed to </button>, and markup crashed.

Example of injected HTML:

<div class="content">
<button class="btn btn-negative btn-block" onclick="Logout();>Logout</button>
<div class="heartbeat"></div>
</div>

Injecting code:

$('body').html(finalHtml);
$('#heartbeat').html('');

What it turned to:

<div class="content">
<button class="btn btn-negative btn-block" onclick="Logout();>Logout</button>
<div class=" heartbeat"=""></button>
</div>

Where should I seek a reason? It's a Ratchet bug? Or Cordova? I'm completely out of mind :(

1

There are 1 best solutions below

2
On BEST ANSWER
onclick="Logout();

you are missing " there at least. After that it seems to work correctly at least on JSFiddle.