What is the equivalent of this javascript addEventListener
function displayStorageEvent(e) {
if (e.key == 'storage-event') {
output.innerHTML = localStorage.getItem("storage-event");
}
}
window.addEventListener("storage", displayStorageEvent, true);
to Jquery? I have been trying to use it with .bind() but it does not know the "storage" keyword. I tried it with this but 'e' is undefined.
$(document).ready(function(){
displayStorageEvent();
});
thanks.