Is it possible to convert DOM element into string?
Basically I need something like this:
List:
<div selector="HERE DOM ELEMENT" > Some element</div>
<div selector="HERE DOM ELEMENT 2" > Some element 2</div>
<div selector="HERE DOM ELEMENT 3" > Some element 3</div>
And when I click on some of selectors I would like it to highlight specify Dom Element.
This list is generated by script like this :http://tinybug.smartbird.pl/example/index.html . And when I click on Selector list, it sometimes selects the wrong Dom Element.
Any ideas?
Best Regards
You can’t store DOM elements as string and find them later by that string. You have to somehow identify those elements whether by id, or class, or even tag name with all attributes, but you have to identify them. That will help you to use that string in jQuery.
I can suggest some kind of algorithm:
#id_of_element