문제

I have an issue with appending to a node on a Kendo TreeView

 $(groupNode).find('div:first').append("<div id='divWeightings' style='padding-left: 40px; font-size: 9px; color: gray;'>This group has total weightings of <span id='spWeight' style='background-color:" + bgColor + ";'>" + totalWeight + "<span>%</div>");

The code displays like this in the page:

This group has total weightings of 100

The issue that I have is that the % is not showing up on the page. Why is that?

도움이 되었습니까?

해결책

So to close the question.

The % sign needs to be escaped or converted to HTML sign.

'&#37;'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top