Home › Forums › JavaScript › Replacing a part of my webpage with another html file › Reply To: Replacing a part of my webpage with another html file
December 21, 2015 at 5:09 am
#236063
Shikkediel
Participant
Sounds like one for jQuery (Ajax) :
$(function() {
$('#readmore').one('click', function() {
$('#parentdiv').load('newcontent.html');
});
});
You could also use a text file for it.
Another approach – add all content and hide the second one, then flip visibility once the button is clicked.