Question

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?

Was it helpful?

Solution

So to close the question.

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

'&#37;'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top