This is a migrated thread and some comments may be shown as answers.

Change custom tool imageUrl on mouseover

3 Answers 44 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Nelbin
Top achievements
Rank 1
Nelbin asked on 16 Aug 2013, 01:12 AM

Is there any function/javascript regarding mousever event? I want to change the image of my custom tool once it is hovered by the mouse pointer. Thanks in advance!

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Aug 2013, 01:10 PM
Hi Nelbin

Try the following CSS to change custom ImageUrl on mousehovering.
CSS:
<style type="text/css">
 .RadImageEditor .rieInsertImage .rtbIcon:hover
  {
    background-image:url('yourimage.gif');
  }
</style>

Thanks
Shinu
0
Nelbin
Top achievements
Rank 1
answered on 19 Aug 2013, 12:10 AM
HI Shinu,

the CSS isn't working. I tried that too but still not executing. FYI I also have two custom buttons in the ImageEditor
0
Vessy
Telerik team
answered on 20 Aug 2013, 03:11 PM
Hello Nelbin,

The provided by Shinu approach is the correct one, I guess that you will need to use a little bit heavier selectors in order to apply those styles to your custom buttons:
.RadImageEditor .rieInsertImage.rieBackgroundImg span.rtbIcon:hover
{
    background-image: url('yourimage.gif');
    background-position: center;
}

Another thing you can try is to add !important to the styles:
.RadImageEditor .rieInsertImage.rieBackgroundImg span.rtbIcon:hover
{
    background-image: url('yourimage.gif') !important;
    background-position: center !important;
}

Note, that in order to apply the styles above the highlighted part of the selector have to be exactly the same like the custom CommandName that you want to apply them to.

Regards,
Veselina Raykova
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
ImageEditor
Asked by
Nelbin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Nelbin
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or