I don't quite understand how the "remove" method of jQuery is working. I'm trying to remove a HTML element from a DOM node. I have appended this element by using jQuery like this:
element = $("#templates .window").clone(true);
Then I try to remove this appended element with this line ("element" is the same object as used in the append-line above):
But the result is an error message:
Error: t.substring is not a function
Source File: http://localhost/~k/x3tc/scripts/jquery.js
In other jquery methods I can use selector expressions and DOM nodes as arguments. But looks like the "remove" method only accepts selector expressions. So how can I remove this node from the DOM? The only reference I have is this "element" variable.