html - jquery not clear div -


i have code ajax load in site

if (base === 'basic') {     $.ajax({         url: location,         data: {},         success: function (result) {             document.title = titlepage;             window.history.replacestate(null, null, url);             $('#content').empty();             $('#content').html('');             $("#content").html(result);         }     }); } //if base 

everything work on not

$('#content').empty(); $('#content').html(''); 

how can clear on

<div id="content"> 

so can load new things on it? lot of other div , other codes in it.

the problem have 2 tags same attribute value attribute id. html specification id must unique identificator.

<header>     <div id="content"></div> </header> <section>    <div id="content"></div> </section> 

so change header div id , ready go.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -