Retrieving DOM textnode position
Hi, Is it possible to retrieve the geometric position (i.e. top/left offsets from either the parent element, the page, etc) of a text node? ...
Hi, Is it possible to retrieve the geometric position (i.e. top/left offsets from either the parent element, the page, etc) of a text node? ...
I have a table that has rows like this: <tr id="" class="objectRow"> <td class="bulkSelector"><input id="" type="checkbox" value=""/></td> <td class="favorite"></td> <td class="name"><a id="" class="" href="">Ut Urna Nisl</a></td> <td class="description"><p>Nam feugiat tincidunt massa nec venenatis. Mauris egestas consectetur ma...
I want to create an array of all the html elements within a div that contain text strings, such as <p>some string</p>. I don't want to get hold of the strings, I want the array items to be the elements (in the example, would be the p node). I do not know before hand what the strings will be, so I can't look for string values to match...
Hi, Is there a way to get the bounding rect of a text node? The getBoundingClientRect() method is defined on elements only, and the parent element is bigger then the actual text node. 10x! ...
my HTML code : <body>Firebrand will tend to burn any bricks out there. so the best idea is to ignore any active firebrand if you are a bricks. Otherwise, you can challenge a firebrand if you have the proper quality to keep up with their latest technology. And don't mess up with firebrand if you are a robber.</body> I want to find any ...
I want to attach a "mouseup" event on all nodes of a container, including text nodes using jQuery. How do I do that? Update: If I had some HTML fragment like this: <p>Some text node <strong>strong text</strong> another text node.</p> Currently, $("p *") will apply the event to the <p> and <strong> but not to the 2 textnodes within <...
How do I go about removing an individual dynamically created text node? I am generating input's on the fly and am using .createTextNode to place descriptive text before the elements. I need the ability to delete specific elements that are being created and am using .removeChild to do it. That works fine for removing an individual inp...
How is it that I always get only the first 4096 chars of a valid XML text node? (using JavaScript...) is a text node limited? ...
Hi, I've been using some buttons for a while now that have a depressed effect as they are clicked using position relative and a top: 1px in the :active pseudo-class. I had problems with click events not firing and it turned out to be due to the mousedown and mouseup events not firing on the same element. I did a bit of fiddling to make...
Hi, I try to explain you my "problem". I would like to know when I select a part of text, if this text is “wrapped” by html tags, and in function delete them. For example with this sentence : The car is <strong>green</strong>, and the boat is black If I select “green” and click on a button, I would like verify if green is wrapped by ...
My current project involves gathering text content from an element and all of its descendents, based on a provided selector. For example, when supplied the selector #content and run against this HTML: <div id="content"> <p>This is some text.</p> <script type="text/javascript"> var test = true; </script> <p>This is some more...
Is there any way to get the collection of all textNode objects within a document? getElementsByTagName() works great for Elements, but textNodes are not Elements. Update: I realize this can be accomplished by walking the DOM - as many below suggest. I know how to write a DOM-walker function that looks at every node in the document. I ...
There is an element: <phone>(987) 123-45-67</phone>. It is necessary to transform it in: <span><small>(987)</small> 123-45-67</span>. How it can be made? ...
hi all im having a firefox issue where i dont see the wood for the trees using ajax i get html source from a php script this html code contains a tag and within the tbody some more tr/td's now i want to append this tbody plaincode to an existing table. but there is one more condition: the table is part of a form and thus contains che...
Hello! I am looking for a way to perform fulltext search on the DOM tree with JS. In two words, I would like to retrieve the list of text nodes which contain a given string. I've tried mootools' Element.getElements ( ':contains[string]' ) but I can't get it to work with strings containing whitespace. EDIT: jQuery and mootools seem to ...
Possible Duplicate: Given an ID, find and replace the last sentence with a span wrapper Give a DIV with a block of text with sentences, meaning a period. How does one use the JQUERY text nodes to find the last sentence and wrap just the last sentence in a SPAN tag? Thanks ...
Hi, I want to add an element to a textNode. For example: I have a function that search for a string within element's textNode. When I find it, I want to replace with a HTML element. Is there some standard for that? Thank you. ...