As I was looking to add some divs (specifically a business partners carousel) into my html code, I realized the importance of streamlining the process. With an increasing amount of articles, it wouldn't be practical to manually edit each html page. That's why I decided to refer to one file where all changes could be made.
After some research, I found a solution using jquery, which I was already familiar with. The example I followed can be found here: JQuery: replace DIV contents with html from an external file. Full example?. I am importing the content from this file: .
<script type="text/javascript>
$(document).ready(function(){
$('#selectedTarget').load('../partnerscarousel.html');
});
</script>
The script successfully imports the content, as demonstrated on , however, the appearance of the imported divs is not quite what I had hoped for.
I experimented with importing different sections, but unfortunately, the outcome remained consistent.