learn-co-curriculum / phase-0-javascript-events-event-listening-lab Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
https://learning.flatironschool.com/courses/5631/assignments/175600?module_item_id=385684
The id of the input on the HTML is not the same as the id the test file expects.
No response
In the HTML file (line 20) you can either change the Id of the input element to "input" or you can change the test file (line 7) expected id on the input to "button"
https://learning.flatironschool.com/courses/5192/assignments/185948?module_item_id=413207
I just think the lab could be improved if you added an event listener to a button and then triggered a button rather than an input box
No response
No response
https://learning.flatironschool.com/courses/5298/assignments/168040?module_item_id=363097
student was failing test because the id that is given on the html element that is being queried by test is set to button
whereas the test queries for input
FIX: change the id='button' to id='input' in index.html
No response
FIX: change the id='button' to id='input' in index.html
https://my.learn.co/courses/355/assignments/16574?module_item_id=38484
Canvas references element id "input" in code snippet and elsewhere. The correct element id is "button". It's referenced correctly in the readme.md in GitHub for this lesson.
Now when you click inside of input#input, you will get an alert box. Should be input#button
No response
const input = document.getElementById('button');
In the lesson in Canvas the code includes const input = document.getElementById("button")
and instructs students to copy & paste the code into the console in the browser and VS Code in order to pass the test. However, the button's Id is "input" in index.html, not "button" so an error pops up. Not sure if this is intentional or not, but wanted to flag it just in case.
Fork button is linking to portal.flatironschool.com instead of github on the course page in learn.co.
Thanks for raising this issue! Future learners thank you for your diligence. In
order to help the curriculum team address the problem, please use this template
to submit your feedback. We'll work on addressing the issue as soon as we can.
Please fill out as much of the information below as you can (it's ok if you
don't fill out every section). The more context we have, the easier it will be
to fix your issue!
Note: you should only raise issues related to the contents of this lesson.
If you have questions about your code or need help troubleshooting, reach out to
an instructor/your peers.
Add a link to the assignment in Canvas here.
initial npm test results in this:
$ npm test
[email protected] test
mocha --timeout 5000 -R mocha-multi --reporter-options spec=-,json=.results.json
0 passing (7s)
1 failing
Write a clear and concise description of what the bug is. Include the file and
line number(s) if possible.
Write a clear and concise description of what you expected to happen.
If applicable, attach screenshots to help explain your problem.
Add any other context about the problem here.
https://learning.flatironschool.com/courses/5185/assignments/179292?module_item_id=396166
This phrasing seems backwards:
We could then hook up as many elements as we'd like to our clickAlert.
It seems like we are able to attach our cool function to lots of different elements/events rather than attach events to the function. Is this saying that under the covers, the clickAlert function object maintains a list of all the elements it is hooked to?
No response
Instead of this:
We could then hook up as many elements as we'd like to our clickAlert.
it seems like the flow is more like:
We could then hook up our clickAlert function to as many elements as we'd like.
Are the callbacks attached to elements or to events?
If I'm missing this, maybe a deeper explanation is needed. :-)
https://learning.flatironschool.com/courses/5192/assignments/185948?module_item_id=413207
const input = document.getElementById('button');
No response
The id isn't 'button' , it should be 'input' for this to work. The code that we need to copy and paste from the README/canvas module still has 'button' for the const input
https://learning.flatironschool.com/courses/4978/assignments/167576?module_item_id=362197
The answer solution of the lesson has
const input = document.querySelector('button')
The id of this element is "input".
or
https://learning.flatironschool.com/courses/5292/assignments/179703?module_item_id=396882
There doesn't appear to be a button element but I might be wrong as I'm still learning
const input = document.getElementById('button');
input.addEventListener('click', function() {
alert('I was clicked!');
});
VM1327:2 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
at :2:7
add a button element
https://learning.flatironschool.com/courses/5300/assignments/179744?module_item_id=397074
There was an error in the test. It should read:
input = document.getElementById('button');
No response
There was an error in the test. It should read:
input = document.getElementById('button');
https://learning.flatironschool.com/courses/5292/assignments/179703?module_item_id=396882
The input element is input#input, not input#button, when you copy and paste the provided code from the first code block it returns an error in Chrome DevTools console... unless you switch getElementById to:
const input = document.getElementById('input');
No response
const input = document.getElementById('input');
input.addEventListener('click', function() {
alert('I was clicked!');
});
https://learning.flatironschool.com/courses/5192/assignments/185948?module_item_id=413207
In this lesson, it refers to the Id as 'button' but in the code from the repo, the Id is 'input'
No response
No response
https://learning.flatironschool.com/courses/5639/assignments/179041?confetti=true&submitted=0
Code:
function addingEventListener() {
const input = document.getElementById('button');
input.addEventListener('click', () => {
document.getElementsByTagName('div')[1].remove();
});
}
The above code doesn't run in the browser. However, removing the nested code from the addingEventListener()
function allows it to run successfully.
No response
No response
https://learning.flatironschool.com/courses/5298/assignments/168040?confetti=true&submitted=0
In the IndexTest.js code, the test calls for one variable, but the js code that we are told to paste has a different variable.
No response
Make the variable in the indexTest.js the same as index.js
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.