For my example I have 3 a href tags. So if I click on the first a href tag so I like to pop the first event_id from the array variable in the console. How can I to solve this?
Here my HTML code:
<a href="#" event-id="" class="event_delete">Link</a>
<a href="#" event-id="" class="event_delete">Link</a>
<a href="#" event-id="" class="event_delete">Link</a>
Here my jQuery code:
var event_id = new Array();
//event_id for the first a href tag
event_id.push("1X4JxCOwhDpD4Oj5ch");
//event_id for the second a href tag
event_id.push("LKb77tAmVzeJJjE83LH");
//event_id for the third a href tag
event_id.push("h0NTcpfUlinWbpwBbpB1");
jQuery('.event_delete').click(function(){
var index = jQuery('.event_delete').index(this);
//..
//console.log(event_id.pop(???))
})