I have this code that is a couple of links with divs inside them. When i click on one of the links it pops another div up that fills out using the "Case No" and "Type". However it only uses the data from the first link, not any other that i click.
HTML
<div class="plu-view-data">
<a href="#" id="tp_0">
<div class="tp-box">
<div style="width: 45%; float:left;" id="type">TICKET</div><div style="width: 55%; float:left;">WRITTEN: 01/01/2018</div>
<div id="case_no">CASE NO: 1234</div>
</div>
</a>
<a href="#" id="tp_1">
<div id="tp_id" class="tp-box">
<div style="width: 45%; float:left;" id="type">WRITTEN WARNING</div><div style="width: 55%; float:left;">WRITTEN: 01/01/2018</div>
<div id="case_no">CASE NO: 1235</div>
</div>
</a>
</div>
and the javascript is
$('.plu-view-data a').click(() => {
$("#pedlookup-overlay").css('display','block')
var type = $(this).find('#type').text()
var caseno = $(this).find('#case_no').text()
$('#plu-overlay-headbar').find('p').html(type+" || "+caseno)
})
Any idea as to why when i click the link it only uses the first link information?