I have a sort where it was created with loading from JSON files. Now I want to delete the item.
I get the name of the element from the text box that I have to undo. I save the namdel
variable. With the for loop, I'm going to compare this variable with the name of the sortable.
HTML code of the sortable:
<div id="sortparam"> <ul style="" class="ui-sortable" id="sortable"> <li style="" id="1" class="ui-state-default"> <span class="ui-icon ui-icon-arrowthick-2-ns"></span>Singular sensation</li> <li style="" id="2" class="ui-state-default"> <span class="ui-icon ui-icon-arrowthick-2-ns"></span>Beady little eyes</li> <li style="" id="3" class="ui-state-default"> <span class="ui-icon ui-icon-arrowthick-2-ns"></span>Little birds </li> </ul> </div>
The problem is how to read the elements, because if I read with:
var contapara=1; var l = document.getElementById(contapara).innerHTML; alert(l);
The program is written to the warning window:
<span class="ui-icon ui-icon-arrowthick-2-ns"></span>Little birds
I want only Little birds
.
source share