JSFiddle - React, Tailwind, and code Playground

by tuga

HTML

<li><a href='#refPerson' onclick="getId(e);" data-transition='pop' id='someId'>Some Text</a></li>

JavaScript

$( document ).on( "mobileinit", function() {
function getId(e){
 var myId = $(e).attr("id");  
 console.log(myId);
}
});



$(document).on('pagebeforeshow','#refPerson', function(){
    console.log(myId);
    });