I’m using the jQueryify bookmarklet on a page so that I can call jQuery functions from the console. But everytime I invoke a jQuery function on a selected object, I get the error:
"TypeError: jQuery("li")[0].children[0].html is not a function
[Break On This Error] jQuery('li')[0].children[0].html();
I have tried this in FireBug as well as Google Chrome’s Webkit console.
You are no longer working with jQuery objects when using square braces.
This returns you the 1st
lias a DOMElement, not a jQuery object.This returns the 1st
li‘s 1st child as a DOMElement, not a jQuery object.This function only works for jQuery objects. For DOMElements, you can use the
.innerHTMLproperty.I suggest instead of dealing with DOMElements, you should continue working with jQuery objects. Try using this instead: