The highlight in the sample comes from the default behavior that comes with the infoTemplate.That's how you can create your own highlight on click: require(["dojo/on", "esri/symbols/SimpleFillSymbol", "esri/symbols/SimpleLineSymbol", "dojo/_base/Color", "esri/graphic"], function(on, SimpleFillSymbol, SimpleLineSymbol, Color, Graphic) {
on(fl, "click", function(evt) {
// clears current selection
map.graphics.clear();
// create new graphic with selected graphic's geometry
var graphic = new Graphic(evt.graphic.geometry);
// create a new symbol for the graphic
var sfs = new SimpleFillSymbol(SimpleFillSymbol.STYLE_FORWARD_DIAGONAL, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0]), 2), new Color([255, 255, 0, 0.5]));
// add symbol to the graphic
graphic.setSymbol(sfs);
// add the graphic to the map
map.graphics.add(graphic);
});
});
Also instead of adding the graphic to the map, you could create a GraphicsLayer and add the graphics to it, so you will able to clear only the graphics layer instead of all graphics on the map.