Closed TrevorBurnham closed 11 years ago
That overspecified selector makes me a sad :panda_face:.
But how will people ever understand how jquery works if I don't show it to them!?!?!?!
@zackbloom
Obvi:
var out = $('<ul>');
$.each(new Array(a), function(){ out.append($('<li>')); })
$.each(new Array(b), function(){ out.append($('<li>')); })
alert(out.children().length);
It's the only way.
@zackbloom pls publish as jq plugin.
@roderyc v0.1a maybe. Too efficient for a v1 release.
FYI, the example still doesn't work when you click "Run" because there's no element called #message-container
on the page. Some other examples (like hookBackbone
) have "Run" buttons but are no-ops as well. Maybe there should be separate "Examples" and "Advanced" sections, with all the runnable examples in the former.
Yea, I just made them all runnable in the interest of consistency. Fleshing out those others is a good idea.
The docs include an example with the line
but
ActionMessenger
is scoped within themessenger.js
file, and besides, the argument would have to beel: $('div#message-container')
.I believe the simplest fix is to change the line in the docs to