Skip to main content
Share Your Experience: Take the 2024 Developer Survey
3 votes
Accepted

Get the contents of a table cell for all selected rows

Calling push() inside an each() loop can typically be simplified with map() Typically when ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
3 votes

Get the contents of a table cell for all selected rows

You can go with a one-liner along with less traversel like this: recipients.push($(this).closest('td').siblings('.email').text()); Your code traversal pattern: VS ...
Death-is-the-real-truth's user avatar
2 votes

Rubik's cube scrambler with timer and list of solves

I do not have the time to do a review to my quality standards I do not presume to eclipse your star-shine quality standards, rather, in the spirit of of teamwork I offer my modest input based on @...
radarbob's user avatar
  • 7,599
2 votes

Reorganice (and style) form's output in HTML using JQuery: how to do it better?

Some quick suggestions after reviewing your code: Chain jQuery methods: You can chain methods to reduce the number of times you traverse the DOM. Use .text() ...
Jimmy Kurian's user avatar
2 votes

Changing every link on page, in fastest way possible

The easiest way to get a performance boost in your code is to not use jQuery: ...
RobH's user avatar
  • 17k
2 votes

Calculate Prime Number using web workers and Web storage in HTML5

Your code is pretty much fine with what you are wanting to do. You might like to make the following changes: HTML: Change the max attribute to 99 to ensure the input is less than 100. Move inline ...
Dhruv Garg's user avatar
1 vote

Rubik's cube scrambler with timer and list of solves

@radarbob already explained my codepen and please read his explanation before as I not going to cover that part again but going to build upon that covered knowledge! 1 Timer Function Your timer ...
tacoshy's user avatar
  • 394
1 vote

Changing every link on page, in fastest way possible

You must match T titles against a dictionary of W words, and your current code runs in O(T × W) time. For at least some of your thousands of strings (and for all eleven that appeared in your example) ...
J_H's user avatar
  • 27.6k
1 vote

jQuery + PHP Form Submit and Refresh

Regarding PHP part, the error handling is rather inconsistent. To make it solid and useful, I would suggest Use appropriate HTTP status codes. an error in the input data is a problem with request, ...
Your Common Sense's user avatar
1 vote

jQuery + PHP Form Submit and Refresh

This is unfortunately almost off-topic, since it - especially the PHP - is unrunnable stub code, but I think the JavaScript is reviewable, which is what I'll look at. First, the indentation is off. ...
RoToRa's user avatar
  • 11k

Only top scored, non community-wiki answers of a minimum length are eligible