I have the following HTML code :
<html>
<head>
</head>
<body>
<div id="never-selected">
</div>
</body>
</html>
With JQuery 1.3.2, I would like to create wrapper around $() that allow you to select any element with any combination but the div #never-selected nor its content.
I am trying to do it this way :
_context = false;
getContext = function() {
if (_context === false) {
_gui_dom = jQuery("fuzzy magic selector");
}
return _gui_dom;
};
// return a jQuery object filtered to aim the content of the tartiflet GUI only
select = function(selector) {
return jQuery(selector, getContext());
};
But I am failling to find the proper formula to cast the "fuzzy magic selector" ;-)
My best shot is jQuery("head *, body *:not(#never-selected, #never-selected *)")
but the draw back is that you cannot select head nor body and it's very annoying. Using html * doest work.