I want to detect the onClick
& onHover
on different parts of a image.
<img src={physicalimage} id="physicalimage" usemap="#image-map"/>
<map name="image-map">
<area target="" onClick={this.consoleMessage("bpleft")} alt="bpleft" title="bpleft" coords="223,201,269,254" shape="rect" />
<area target="" onClick={this.consoleMessage("bpright")} alt="bpright" title="bpright" coords="60,199,101,259" shape="rect" />
<area target="" onClick={this.consoleMessage("heart")} alt="heartrate" title="heartrate" coords="169,124,219,183" shape="rect" />
</map>
I use react library for developing my website. I am not able to detect the onClick
event. Are there any other alternative?
onClick={this.consoleMessage("bpleft").bind(this)}
? – Unwilling