So this first jQuery works. It loads a specific section of another html page into an id of #main_text.
$(function() {
$('[id^="nav_"]').on("click", function() {
var letter = this.id.split('_')[1];
$("#main_text").load("page" + letter + ".html #main_text p,h2,h3,span #hidden");
});
});
I now want to load multiple html files into that #main_text. So I tried to push them into an array and then .load that array. It's not working. Is this even possible?
$(document).ready(function() {
var array = [];
array.push('page_mark1.html');
array.push('page_mark2.html');
$('#mark').on("click", function() {
$("#main_text").load('array');
});
});