Jquery object's context always is undefined
Hi Guys,
I try to use jQuery( html, [ ownerDocument ] ) to create a element and get the jquery object.
- var $list = $('<ul class="list">');
- console.log($list.context); // return undefined
- $('body').append($list);
- console.log($list.context); // return undefined
But the jquery object's context is undefined. Even if I append it onto another element.
So can anyone tell me how can I set the context to the jquery object? (Right now I just set the context as document manually... But I think it's not a good way.)
Thanks,
Hao.