2

I have footer code below. I want to add some html content (see below) but if I do it, the default content disappear. I want to keep default content and add the new one. How to do that?

<div id="footer">
HTML content and some classes
</div>

And my code to add another HTML content with classes:

<script>
document.getElementById('footer').innerHTML = '<div class="bannery"><img class="obrazek" src="URL"></div>';
</script>

Thank you :-)

Patrik
  • 69
  • 1
  • 10

1 Answers1

3

Try this : document.getElementById('footer').innerHTML += '<div class="bannery"><img class="obrazek" src="URL"></div>'; That should work