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

Drag and Drop Hover Effect I.E. issues

1 Answer 81 Views
ListView
This is a migrated thread and some comments may be shown as answers.
robertw102
Top achievements
Rank 1
robertw102 asked on 05 Aug 2010, 07:52 PM
Hi,

I'm trying to get a proper hover effect for the drag and drop with the Listview.

When the user drags the icon image from the left control over top of the right control, the selected item should light up with a hover effect. 

This was easily accomplished for FF and Chrome.
 
However, with IE, I need to figure out the J-query that will enable the hover effect over the destination elements.  I can get it to make a hover effect over the entire right container but not the individual selected element where the user wishes to drop the icon.

I just need a simple script that finds out which element is being dragged over (possibly in the itemDragging event) so I can set the CSS to force a hover effect in IE.

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 10 Aug 2010, 04:32 PM
Hi robertw102,

You can use a very simple script for that. Simply hook up to the onmouseover and onmouseout events of the LinkButtons that represent the genres:

<asp:LinkButton ID="GenreLink" runat="server" CommandName="ShowTracks" CommandArgument='<%# Eval("Key") %>'
    onmouseover='this.className += " selected";'
    onmouseout='this.className = this.className.split(" selected").join("");'>
    <%# Eval("Key").ToString() == "" ? "Unsorted" : Eval("Key") %> 
    (<%# Eval("Value") %> items)
</asp:LinkButton>

The above code adds the "selected" CSS class to the links on mouse over and removes the same class on mouse out. The selected CSS class is already defined in styles.css and it gives you the hover effect when dragging the tracks over the genres.

Regards,
Veli
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ListView
Asked by
robertw102
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or