On 28/11/06, Juha Suni <[EMAIL PROTECTED]> wrote:
>
>
> Considering option 3 and the disadvantage of the cursor not being able to be
> on top of the helper:
>
> Have you guys considered ways to go around this. Since #3 seems like the
> fastest, you might want to look for little tricks.
>
> I quickly crunched together a small proof-of-concept showing that you can
> get the effect of the cursor being on top of the helper while still
> accessing the elements below through event.target. Yes, technically there is
> no helper-element under the cursor, but a few surrounding it giving the same
> effect. Although at first it might seem a little hackish, the code isn't
> that much, and even my glue-and-gum proof-of-concept seems to work ok. At
> least it should scale nicely since it doesn't really care about the amount
> of droppables.
>
> It shouldn't be too hard to add some background color / image stuff to the
> "helper" if more visuals are needed.
>
> Oh, and this is 100% only Firefox-tested and coded, to see if this is
> feasible at all. Will propably explode with any other browser, currently.
>
> Check it out at: http://www.sparecom.fi/test/
>
> --
> Suni

Doesn't work in IE7, as you use event.pageX/pageY

To get it to work in IE, replace these lines:

        $(document).mousemove(function(event){
        
                var target_elem = $(event.target);

With

        $(document).mousemove(function(event){
        
                if(!event.pageX)
                {
                        event.pageX = event.clientX + document.body.scrollLeft;
                        event.pageY = event.clientY + document.body.scrollTop;
                }
                var target_elem = $(event.target || event.srcElement);

Hopefully when jQuery 1.1 is out it would mean you don't have to do
this and you can stick with event.pageX/Y and event.target.

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to