Overview
First of all, it is very unobvious what your code should do, but here are some problems:
jQuery.QuickTest = { $TestList: {}, build: function() { $TestList={};
You define jQuery.QuickTest.$TestList , but inside build() you declare a global $TestList object.
Functions declared in jQuery.fn must act on a consistent set of elements (referenced by this ) and return it; your function does not.
The answers
The answer to some of your questions:
.remove() is a jQuery function that removes nodes from the DOM and must be called into a jQuery object.
.splice() applies only to Array , and even if you access the $TestList as if it were one, it is just Object .
.delete() not any function that I know; -)
Possible Solution
To remove an entry from $TestList , you can use delete as follows:
delete $TestList[1];
Ja͢ck source share