tags:

views:

188

answers:

2

Hi, With jQuery.support and without using jQuery.browser how would I know if the browser would return nodes of Type of Text_Node ?

Ex: Would the value of $(this).contents().length be the same in Firefox and IE if there is nodes of type Text_Node ?

Found my response on stackoverflow:

jQuery.support.leadingWhitespace
+2  A: 

$('td') will always return a jQuery object, not an actual DOM element or node. jQuery does this in order to standardize behaviour and help alleviate the need for browser-specific handling of different types.

Peter
+1: you never need to know if the type is text_node if you always let jQuery handle the DOM manipulation.
geowa4
My question was not well formulated. There is a thread on how to obtain text nodes with Jquery here : http://stackoverflow.com/questions/298750/how-do-i-select-text-nodes-with-jquery. But Firefox will give a different results with $(this).contents().length than IE. So my question persist
Jean-Philippe Martin
A: 
> jQuery.support.leadingWhitespace
Jean-Philippe Martin