D'oh! I guess I'll have to find a way using plain javascript instead of jQ.
Thanks for your help.
On 2/20/07, Blair Mitchelmore <[EMAIL PROTECTED]> wrote:
Well that behaviour makes sense because to jQuery it would look like a
css selector for a plainText1 element, but that doesn't explain why
l
Well that behaviour makes sense because to jQuery it would look like a
css selector for a plainText1 element, but that doesn't explain why
leading and trailing text gets stripped... *reads code* aha, the jQuery
object, when it does it's little search for html tags (line 32 of svn
rev 1323) in t
Actually when you evaluate a string in the jQuery object, you get an empty
object in return: $("plainText1") becomes the empty object [].
On 2/20/07, Blair Mitchelmore <[EMAIL PROTECTED]> wrote:
Well seeing as it only affects the first and the last 'elements' you
could try testing the first and
Well seeing as it only affects the first and the last 'elements' you
could try testing the first and last elements of the jQuery object
manually. Then you might see why the first element isn't being
recognized as an orphan node when it is and be able to compensate for
that in the filtering func
Thanks, Blair. Your solution works 'perfectly'. Only problem is it doesn't
select orphan nodes at the beginning and end of the string, i.e: in
$("plain1formated1plain2formatted2plain3") only ["plain2"] is
selected.
Any idea how I can work around this?
Abel.
On 2/20/07, Blair Mitchelmore <[EMAIL
I'm not sure if this would work at all and I'm not sure of the syntax
for the function usage of filter but I think it'd work like this
(theoretically):
$(whatevah).filter(function() {
return this.nodeType && this.nodeType == 3; // nodeType of 3 is a
Text node.
});
I have no idea if this wo
Hi all,
this time I need to know the way to select text that is not inside a tag.
That is, in $("orphan1 in span orphan2 in p
orphan3") i would need to get a jQuery object like this : ["orphan1",
"orphan2", "orphan3"].
I've been trying with functions like .filter(String) or .not("HTMLElement