How to define 'event' on the page after navigation- getting 'event' undefined while using event.target.id- Firefox Only
I am using `event.target.id` in the click event of a button. I have button on click of which it navigates to a certain page:
$("#alert-proceed-button").on("click", function(event){
window.location.href= '#accounts/admin';
}
I have passed `event` as a param on the click event function.
I added an event listener to that click so that when the page gets navigated, the 'target id' will be captured and i can perform further action using that 'id'. For that i did something like:
initialize: function (options,eve) {
if( !eve ){
var eve = window.event;
}
this.targetid= eve.target.id
},
and `this.targetId` results: `alert-proceed-button` which is exactly what im looking for. It works perfect on Chrome and Opera, but fails in Firefox giving the 'event undefined' error. Is there any way it can work on both the Firefox and Chrome?
Any ideas?? Thanks!