Joined October 2012
·
Posted to
How to stretch a container around a float
over 1 year
ago
@jverdeyen That's one I haven't seen before. I like it!
Posted to
Avoiding nested asynchronous calls in JS
over 1 year
ago
@nashio Of course it is a lot. The delay is to accentuate the performance difference. I would never have any delay at all in a real application.
Posted to
Avoiding nested asynchronous calls in JS
over 1 year
ago
Posted to
Avoiding nested asynchronous calls in JS
over 1 year
ago
When multiple AJAX calls are used with a jQuery deferred, isn't it correct that they will run in parallel? In this case, your example is not only easier to read, but has a performance boost. The only disadvantage that should be noted is that if there is a data dependency for the second request, based on the result of the first request, then they need to be nested so that they execute in sequence rather than in parallel.
Posted to
DO NOT $('#foo a'); DO $('#foo').find('a');
over 1 year
ago
@thomaspuppe This "protip" showed up in my e-mail box and I read it with horror. Thank God your correction is the top comment.
Achievements
132 Karma
4,763 Total ProTip Views
Forked
Have a project valued enough to be forked by someone else
Charity
Fork and commit to someone's open source project in need
Cub
Have at least one original jQuery or Prototype open source repo
Python
Would you expect anything less? Have at least one original repo where Python is the dominant language
Nephila Komaci
Have at least one original repos where PHP is the dominant language
Or you could just use JSON_PRETTY_PRINT:
Which will produce the following output: