Skip to main content

All Questions

1 vote
1 answer
163 views

Showing form on btn click - preventDefault of submit btn, then remove listener

I've built out a section on a page that contains multiple instances (why I'm using querySelectorAll()) of this Request Brochure form. They are using Campaign ...
Bagseye's user avatar
  • 401
3 votes
1 answer
73 views

eCommerce Mock App

This is a follow-up question to eCommerce Mockup App in JS. How do I implement the 'observe' pattern for the cart to regenerate html? So that, it will keep refresh its own. And any review on my coding ...
Steve Ngai's user avatar
3 votes
1 answer
188 views

Basic event stopPropagation() example - a better way of doing so?

I've got a very very basic demo here that uses the .stopPropagation method. I want to just make it so that clicking on the parent element only runs the function, so ...
user8758206's user avatar
3 votes
1 answer
313 views

Javascript Slider that controls TinySlider - feels inefficient [closed]

I feel like the main point of inefficiency is how I create "notches" and must loop through all of the created notches every time the value for the slider is changed. ...
peter k's user avatar
  • 31
2 votes
0 answers
1k views

JavaScript: implement event listener in custom object

For many years, there have been several JavaScript libraries for implementing custom events and event listeners. But, as MDN web docs suggests, there are now available constructable Event, CustomEvent ...
Passiday's user avatar
  • 121
2 votes
1 answer
428 views

Clean up function in Javascript Event Listener

I am trying to refactor a chess game I am currently creating so the code is more flexible and maintainable, while doing this, I came across an event listener which I have no idea on how to make "...
Crupeng's user avatar
  • 177
5 votes
1 answer
193 views

Javascript To Do Application

I've created a simple JS 'To Do List' application. I'm very new to JS and this is the first JS project I have done. I would greatly appreciate any feedback on how to make the code more efficient, ...
btow54's user avatar
  • 75
1 vote
0 answers
59 views

Repetitive code for an event listener

So I'm using the event emitter as some sort of an event bus(If I'm allowed to call it that). The problem I've stumbled upon is that my listeners might want different data than another listener. Since ...
mertje's user avatar
  • 153
12 votes
1 answer
468 views

Resizable containers with VueJS

A month ago I reviewed the code in Resizable split DIVs Vue.js, suggesting that the OP use computed properties and bound styles to simplify the code (at least reducing the need to use ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
1 vote
1 answer
186 views

Display name and email fetched using JSON API when hovering

I'm learning AJAX JSON. I'm just testing how to pull the data. The idea is, when hovering over the number, it pulls the data and show the content for name and email. Number 1 is to show name and ...
Udzzzz's user avatar
  • 11
6 votes
1 answer
569 views

Resizable split DIVs Vue.js

I just started Developing Web App (Vue.js) for my company for around 1-2 months. Therefore, my knowledge and experience in HTML, CSS and Javascript is kinda shallow. I've created a custom resizable ...
Muhammad Azizi Abdul Aziz's user avatar
9 votes
2 answers
130 views

User-focused timeline logging

I'm working on a small piece of my personal website. I'd like a timeline logging all of my relevant achievements in my career in Computer Science, in general. I'd like to implement a feature that ...
Duke Jake Morgan's user avatar
5 votes
3 answers
411 views

Wrap a js function with a fixed this arg

If I use node.addEventListener('click',Wyg.Editor.nodeClickedEvent); then when node is clicked, ...
Reed's user avatar
  • 239
9 votes
2 answers
5k views

"Block a website" script with vanilla JavaScript

I use this script to block access to a one or more websites with vanilla JavaScript. I find that it helps me avoid some addictive news websites that make me depressed. (Credit to Marat Tanalin for ...
user avatar
5 votes
2 answers
442 views

Dropdown menu that opens on click using plain Javascript

I made a simple dropdown menu which opens when clicked, and closes when the user clicks anywhere outside the menu. The following is the codebase: ...
darkhorse's user avatar
  • 418

15 30 50 per page
1 2
3
4 5
15