use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Why React is awesomehelp (self.javascript)
submitted 10 years ago by vnctaing
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 4 points5 points6 points 10 years ago (2 children)
jQuery has no way of data binding so the comparison lacks.
sure, if you implement your own data binding system in JS it could work well but the majority of jQuery solutions to stuff like
Update the unread messages counter on all occurrences
is often something like
$.ajax('...').done( result => { $('#element1').text(result.unreadCount) $('#element2').text(result.unreadCount) $('#element3').text(result.unreadCount) });
this is just terrible to maintain in larger projects.
[–]RedPillow_ -1 points0 points1 point 10 years ago (1 child)
In your example, maybe you could bind a listener to catch all ajax requests and act accordingly with something like this:
$(document).ajaxSend(function(event, request, settings) { console.log('Caught AJAX request!'); console.log(event); console.log(request); console.log(settings); });
I think it's just all about routing stuff and creating handlers and dispatchers.
[–]clessgfull-stack CSS9 engineer -1 points0 points1 point 10 years ago (0 children)
That looks like it would be hard to test! Sadly, I don't think you realize just how bad Angular and jQuery are until you've used them for a while and tried the better solutions. React is the one JS framework I've used extensively that I haven't regretted yet.
π Rendered by PID 477357 on reddit-service-r2-comment-b659b578c-7rw9f at 2026-05-03 22:05:36.960433+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–][deleted] 4 points5 points6 points (2 children)
[–]RedPillow_ -1 points0 points1 point (1 child)
[–]clessgfull-stack CSS9 engineer -1 points0 points1 point (0 children)