2
votes
CS50 Finance: Register unique username (/check) problem: pythion GET function not working
JavaScript
$.get is asynchronous. It triggers an HTTP request and returns. The code meant to prevent submission runs after submission is processed, and therefore can't prevent it.
The preventDefault ...
2
votes
What purpose does "eventData" serve in the pset8 source code "$("#q").focus(function(eventData)"?
.focus(handler) is short for .on("focus", handler), and installs an event listener, in your case, handler is an anonymous function declared with one parameter.
Those handlers, when called, receive an ...
1
vote
Accepted
Why I can't make one event handler to three elements with its ID? [JQuery]
Use semicolon wherever you mean it. Your IIFE is interpreted as a function call, like
some_expression
// missing semicolon here leads to misinterpretation
(function(){ /* do something */ }());
1
vote
Accepted
How to make a "div" clickable using Jquery
[UPDATE 18/07/2017]
Instead use:
$("main").on("click", ".delete", function() {
(this).closest(".card").remove();
});
The issue is associated with the creation of dynamic elements. The jQuery ...
1
vote
Accepted
Stuck on final project
Assume grid size 3 and hyp_board
0 | 0 | -1
0 | 0 | 0
1 | 0 | 1
The first "check each row" loop will return 1 as the winner. Won't it?
"On paper" from i = 2:
first_node = hyp_board[2]...
1
vote
Final project: How to submit form without going to another page with Ajax/jquery?
The return value of a successful $mysqli->query involving INSERT is true (it does not return an object), so you can test for this and echo a corresponding message.
1
vote
Accepted
jQuery syntax help
It is an object method. See getJSON api doc especially The jqXHR Object section. This article on jQuery chaining explains why it looks like the methods are "not attached to an object".
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
jquery × 11javascript × 5
pset8 × 4
final-project × 3
cs50x × 2
finance × 2
python × 1
html × 1
mashup × 1
addmarker × 1
cs50-forms × 1
button × 1