jzed
jzed copied to clipboard
Functional Javascript alternative to JQuery.
grammar
This is the bug I was telling you about. $new always returns a div element when I think the intention is to return whatever element is represented by the tag...
$replace_with was referencing `string` instead of the passed in attribute of `newhtml`.
Unless they're used for a side-effect I'm not aware of, I guess that $next() and $previous() should return the next/previous node right?
function $parse(htmlString) { var tmp = document.implementation.createHTMLDocument() tmp.body.innerHTML = str return tmp.body.children; } Unless I'm missing something, tmp.body.innerHTML should be set to htmlString?
Just glanced through the source - unless I'm missing something here, `string` should really be `newhtml`. ``` function $replace_with(node, newhtml) { node.outerHTML = string; } ```
It's javascript which has a clear convention in the language itself for camelCase functions: `toString`, `parseFloat`, `toLowerCase`, etc. There are no underscores in function names in the javascript language nor...