You can use ng-mouseover to flag the car to highlight
<ul>
<li ng-repeat="car in cars" ng-mouseover="car.highlight = true">
{{car.id}}: {{car.price}} (please, highlight the infoWindow in map onmouseover)
</li>
</ul>
Then change the class on the div with ng-class:
var content = '<div id="iw" ng-click=showDetails() ng-class="{'highlight': car.highlight}">{{infoWindowText}} €</div>';
Define the css class highlight
to highlight your div
Update
I updated your plunker to change ng-class
attribute. Car id must be resolved before ng-class because it is not in the directive scope:
ng-class="{highlight: ' + cars[i].id + ' == selectedCar}"
If you want update the InfoWindow style, you need to retrieve the InfoWindow from the car when the car selected change. You can add a watch on selectedCar
in you directive, get the infoWindow matching then edit the style with JQuery
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…