On Oct 16, 2012, at 5:32 PM, Trik wrote:

> Hi there,
> 
> I'm a littlebit confused, i'm not a prototype expert and i would like to 
> solve a problem.
> I have an old library based on 1.6.1 version.
> 
> There is a method that make an error when i try to upgrade to 1.7.1 : 
> 
> function onMousedown(event) {
>     var draggable = event.findElement('[ui:draggable="true"]');
> 
>     if (draggable) {
>       event.stop();
>       currentDraggable = draggable;
>       initPointer = event.pointer();
> 
>       document.observe("mousemove", onMousemove)
>               .observe("mouseup",   onMouseup);
>     }
>   };
> 
> Seems the new selector Sizzle don't like the '[ui:draggable="true"]' 
> expression.
> 
> --> Syntax error, unrecognized expression: [ui:draggable="true"]
> 
> Do you have an idea what could be a good syntax ?

Sizzle (or even other selector engines) base their behavior on CSS selectors. 
If ui:draggable is an attribute that can be applied in HTML to an element, then 
they can select it, usually. Can you show the HTML that this is supposed to 
match? Is that HTML valid according to W3C's validator? That's another very 
important place to start. While browsers put up with almost any sort of crap 
HTML, JavaScript DOM is a more unforgiving taskmaster.

Walter

> 
> Hope this will be enought as informations to help me.
> 
> Thanks in advance guys :)
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/prototype-scriptaculous/-/dOlp2b2JeaEJ.
> To post to this group, send email to prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to