Hi,
I have a situation where I want to highlight a particular list item when it's bound property is equal to its inner text, so something like the following.
HTML:
<div data-win-bind="style.border:Person.Name MyNamespace.nameHighlighter" >Bob</div>
Javascript:
winJS.Namespace.define("MyNamespace" {
nameHighlighter : function(personName) {
var targetElement; // This is the part I can't get
if( personName == targetElement.innerText){
return "2px solid Red";
}
else {
return "1px dashed Black";
}
}
});
So the problem I'm having is I can't get the target element that owns this bind from inside the converter. Is this possible? I have a long list of these person divs and I want them to automatically highlight themselves when the data changes.