I'm making a school project and i am stuck here for almost a week. what i am trying to get is... I have 2 pages PAGE 1 have more than five divs with different titles. I want to copy that specific title that the user clicks on and want to paste it on PAGE 2. I have tried so many ways but still not getting the answer.
<!--Page 1 Start-->
<section class="main-content">
<div class="blog-cards egypt">
<div class="blog-card-details">
<h2 class="card-title"><a href="#">Div 1</a></h2>
<a href="#">Abū Sulţān </a><span>•</span><a href="#"> Egypt</a>
</div>
</div>
<div class="blog-cards london">
<div class="blog-card-details">
<h2 class="card-title"><a href="book-now.html">Div 2</a></h2>
<a href="#">Kensington and Chelsea </a><span>•</span><a href="#"> London</a>
</div>
</div>
</section>
<!--Page 1 End-->
<!--Page 2 Start-->
<section class="page2-main">
<h3 class="result-show-here"></h3>
</section>
What i want is if i click Div 1 it will show text of .card-title on Page 2 .result-show-here. and if i click Div 2 it will show text of .card-title on Page 2 .result-show-here. and i don't want to change the class