// Check for the existence of a star rating in the text node
if ( newNodeParts[i].match(/d*$/) )
// Found a star rating - extract the star
lastSpace = newNodeParts[i].lastIndexOf( );
newNodeString = newNodeParts[i].substring( 0, lastSpace );
starImgSrc = /static/img/icons/stars/ + newNodeParts[i].substr( lastSpace + 1, 1 ) + sterren-small.png;
newNodeString = newNodeParts[i];
newNode = document.createTextNode(newNodeString);
targetNode.insertBefore(newNode, refChild);
newImg = document.createElement(img);
source
Комментариев нет:
Отправить комментарий