Is there something like remove(bool) in jQuery? if not, how to create an extension? -
I know that it exists:
$ (".thing"). Remove ()
(1) Is there something like this?
$ ("something.") Remove (wrong); Do not remove // $ (".some") Remove (true); // Delete
(2) If not, how can I expand $
?
I think the answer to my first question, (1), is "no" because I have read the documentation, but I think it is the other method As with .ogg (bool) is inconsistent
or prop ("..", bool)
$ Fn.remove_elem = function (flag) {if (flag) this.remove (); }; $ ("Something.") Remove_elem (true);
Try it out.
Comments
Post a Comment