JavaScript jQuery/javascript event.timestamp doesnt work jquery javascript event,jquery javascript event listener,jquery js event,


I'm doing an exercise, but e.timestamp return initially return "-xxxx" value so the date.toDateString always return "Thu Jan 01 1970 click". I've looked for an answer also on w3schools but also its solution doesn't work! I can't understand why TT_____TT
I use last version of Chrome!
This code works on Microsoft Edge. How I can make it universal?
Thank you guys :)

$(function() {

    $('li').on('click', function(e) {
        $('li span').remove();
        var date = new Date();
        date.setTime(e.timeStamp);
        var clicked = date.toDateString();
        $(this).append('<span class="date">' + clicked + ' ' + e.type + '</span>');
    });

});
Answer:1

How to override navigator.plugins in javascript? There is a web site that reads my plugins list using with navigator.plugins and i don't want let them read my plugins and i want to show them fake ...

How to override navigator.plugins in javascript? There is a web site that reads my plugins list using with navigator.plugins and i don't want let them read my plugins and i want to show them fake ...

  1. override navigator.plugins

I've never written a promise before but I feel like this code communicates my intent. Question: How can I asynchronously fire off matchData() and countData() in the init block, after my http request ...

I've never written a promise before but I feel like this code communicates my intent. Question: How can I asynchronously fire off matchData() and countData() in the init block, after my http request ...

I cannot make the ratings element displayed. It simply does not appear. All other things work fine enough I have linked these properly: Semantic UI CSS (http://semantic-ui.com/dist/semantic.min.css) ...

I cannot make the ratings element displayed. It simply does not appear. All other things work fine enough I have linked these properly: Semantic UI CSS (http://semantic-ui.com/dist/semantic.min.css) ...

I want to create a search bar for my website where it can detect input from the user in the form of typing. How do I start going about this such that when the user starts typing he/she immediately ...

I want to create a search bar for my website where it can detect input from the user in the form of typing. How do I start going about this such that when the user starts typing he/she immediately ...