Remove innerHTML from div
- by coffeeaddict
I'm trying to clear the div's innerHTML before repopulating it. I tried removeData() but once that's called, when I try to add the data, I get nothing from the next line after remove whereas if I remove the removeData() it's fine again. I just want to clear out any previous content in that div before I re-populate it.
divToUpdate.removeData(); //clean out any existing innerHTML div content first
divToUpdate.html(data);
It looks like it never gets to my divToUpdate.html(data) for some reason after it calls that removeData();