[Seaside] Re: Trying to extend jquery -- a question

Esteban Lorenzano estebanlm at gmail.com
Fri May 30 12:15:10 UTC 2008


Hi Sophie,
You are in the right direction, just a few points:

1. ui.base is already supported in jQuery plugin (under UICore name)
2. you have to create a category named "UIDraggable", ans put all the 
additions under that category
3. the method #draggable in JQElement is just: self call: 'draggable'

That's all

Cheers,
Esteban


On 2008-05-30 01:23:35 -0300, "itsme213" <itsme213 at hotmail.com> said:

> I would like to try and add "draggable" (for starters; then some others) to
> the jquery/squeak project, and would appreciate a pointer on where to start.
> The sample code is:
> 
> $(".target").draggable();
> 
> With the libraries and stuff:
> <head>
>   <script src="http://code.jquery.com/jquery-latest.js"></script>
>   <script
> src="http://dev.jquery.com/view/tags/ui/1.5b2/ui.base.js"></script>
>   <script
> src="http://dev.jquery.com/view/tags/ui/1.5b2/ui.draggable.js"></script>
>   <script
> src="http://dev.jquery.com/view/tags/ui/1.5b2/ui.draggable.ext.js"></script>
> 
>   <script>
>   $(document).ready(function(){
>     $(".block").draggable();
>   });
>   </script>
> </head>
> <body>
>   <div class="block" some stuff here></div>
> </body>
> 
> I think I need to do something like this (besides adding base.js,
> draggable.js, and draggable.ext.js to the JQLibrary):
> 
> html textArea
>   id: id;
>   script: (html jqElement id: id; draggable);
>   with: 'some stuff here'
> 
> Am I on the right track? How do I implement #draggable on JQElement?
> 
> Thanks!
> 
> Sophie





More information about the seaside mailing list