I am using various components (mainly grids, lists and group lists) to navigate to other views. Is there a way I can temporarily set the style on a grid row or list item to show that a touch has been detected?
Thanks,
James
I am using various components (mainly grids, lists and group lists) to navigate to other views. Is there a way I can temporarily set the style on a grid row or list item to show that a touch has been detected?
Thanks,
James
onItemClick event takes itemId and event object as arguments. Using event object may get html element of grid row or list item and apply addition className for it. Here is the code for this solution:
[code]function highlightItem(id,e){
var trg = e.target;
while(trg.className.indexOf(this.name==“grid”?“dhx_grid”:“dhx_list”)==-1){
trg = trg.parentNode;
}
trg.className += " touched";
dhx.delay(function(){
trg.className = trg.className.replace(" touched","");
},this,[],500);
}
$$(“grid1”).attachEvent(“onItemClick”,highlightItem);
$$(“list1”).attachEvent(“onItemClick”,highlightItem);[/code]
“touched” css can be like so:
.touched{
background: #eeeeee;
}