Change Color of Image on Click in ASP.Net

Last Reply 29 days ago By dharmendr

Posted 29 days ago

onclicking the image i want change both text and image to be red when the users click

                <div class="col-md-12 ">
                    <a  class="showSingle" target="1"
                    <div class="">
                        <div class=" vehicle-item padding-adjust" style="height: 0px; margin-left: 249px;">
                            <img src="data:image/png;base64,..."><span style="color: grey;margin-left: 16px;font-size: 15px;font-weight: bolder;">OPEN</span>
                        </div>
                    </div></a>
                    <a  class="showSingle" target="2">
                    <div class="">
                        <div class="vehicle-item" style="height: 2px; margin-left: 466px;">
                            <img src="data:image/png;base64,..."><span style="color: grey;margin-left: 16px;font-size: 15px;font-weight: bolder;">CONTAINER</span>
                        </div>
                    </div></a>
                    <a  class="showSingle" target="3">
                    <div class="">
                        <div class="vehicle-item">
                            <img src="data:image/png;base64,..."><span style="color: grey;margin-left: 16px;font-size: 15px;font-weight: bolder;">TRAILER</span>
                        </div>
                    </div></a>
                </div>

 

You are viewing reply posted by: dharmendr 29 days ago.
Posted 29 days ago Modified on 29 days ago

Hi v@run,

You can't change the color of image. The only way is you can replace the url with red image on click.

You can only change the color of Text.