Okay, I use Sublime Text 3, tried using the Find & Replace tool, apparently everytime I type in (using copy & paste), it can never find the text so that I can replace it, I checked to make sure I was looking in the right folder and everything.
So anyways, I’m trying to edit a site template that I downloaded, it includes some sidebar items, intended for updates and stuff. Here’s the code,
[CODE]<div class=”sidebar_item”>
<h2>Updates</h2>
<h3>June 3, 2017</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque cursus tempor enim.</p>
</div><!–close sidebar_item–>
</div><!–close sidebar–>
<div class=”sidebar”>
<div class=”sidebar_item”>
<h3>February 2013</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque cursus tempor enim.</p>
</div><!–close sidebar_item–>
</div><!–close sidebar–>
<div class=”sidebar”>
<div class=”sidebar_item”>
<h3>January 2013</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque cursus tempor enim.</p>
</div><!–close sidebar_item–>
I’m just a pure beginner in JavaScript, and have been confused. Since the Find & Replace tool couldn’t do the job, I’ve been trying to resort to DOM with JavaScript to achieve it, but haven’t had much luck.
My goal, is to each <h3> to a different date, and each <p> to a different update. But I want the updated content to be the same across all pages.
Can anyone help me out with a DOM JavaScript code to achieve this? Or should I…go and edit each page?