It's most likely how you're viewing the page. Most browsers don't support cookies over the file:/// protocol. Which is to say, you may wish to spin up a local web server for development. Will make your life a lot easier.
I’m practicing eventListener() with This dodger game
how ever when I try to move the dodger to the right side without going off the container(The dodger width is 40px) it doesn’t work here is my codepen https://codepen.io/bluesky1992-web/pen/PoeLrzJ[^]
any hint will be greatly appreciated .
You don't have the game object being defined. You should have a const game = document.getElementById("game"); in there. There's also a syntax error of const const causing problems. Once you define game you should see it working as expected.
Can anyone please help me. I have sidebar there are list of form fields. when I drag a field it will not fired outer drop event instead it fires the inner drop event.Inside the drop area I have added Drag and Drop Sortable List for sort the fields when the user drag the fiels.I have also added event propergation event handling but can't work. Here I attached the code
Thanks again, having read up a bit more, I don't really need to parse from a JSON file, a simple array of objects will do the trick.
Of course that makes the title of this post non-relevant, but will post back my solution when I get it, just for completeness, in case anyone stumbles down the same blind alley I did!
(my mistake was that I failed to remove the quotations around "name")
in order to get, say, all the "names" into a new array, 'array.map' does the job:
let names=videoList.map( (item) => item.name);
which gives me a new array containing all the "name" values.
Moving forward, I should be able to do all sorts of useful and interesting things with my youtube videos on my site... At this moment in time, I'd rather maintain a manual list than start wrestling with the YT API!
Your updateChart function doesn't actually do anything with lineChart. You only update myChart inside the function, and you have no other locations that you do anything to update the chart in this code. The fix would be to do the same in updateChart, but this time with lineChart as well.