learn-co-curriculum / js-jquery-document-ready-readme Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Once jQuery senses the document has loaded
i'd say the DOM fires off and event, and then we run out jquery code in a callback
This is the first lesson I have had this problem with so far. It seems the files are not there when I open IDE. This prevented me from having access to the necessary files.
After successfully forking earlier labs and getting a confirmation from Github about this fork, the IDE in the lab did not update. This prevented me from having access to the necessary files.
That's because we haven't set the jQuery to run yet.
i'm not sure if this is the reason the jquery code is not running. i think we should talk about race conditions and the possibility of an element not being on the page when the jquery code runs
This lesson needs an "Open IDE" button to work on the material given.
I'd be careful with language here. It's important to be clear that jquery IS javascript, it's written in javascript, and just uses the native browser API in JS.
For example, this line, "we want to separate out our JavaScript and jQuerys" makes me think this is two different things.
I'm using the IDE on my computer and on this lesson, it gives me the error (Sorry, something went wrong. Please Try Again).
I have uninstalled and deleted the .atom folder with all its data and nothing. Any ideas how to solve it?
But we had to write our JavaScript and jQuery code at the bottom of our HTML body so that the code would run once the page would load. How can we achieve that when our code is in a totally different file? We need to guarantee that the HTML document is loaded before our other files are triggered.
might be worth explaining how the browser parses HTML, and blocks while it reads JS etc.
The lab says to use:
$(document).ready(function() {
// code to be executed goes here
});
But that wouldn't work for me. When I adjusted to the code we learned in lecture, I got it working. That being:
$(document).on('ready', function() {
// code to be executed goes here
})
This section recommend putting the script import at the bottom of the web page,
Isn't current best practice is to use defer
or async
attribute for a web page in ?
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
Missing files to fork and code along with this lesson.
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.