[Seaside] Trying to extend jquery -- a question

Sebastian Sastre ssastre at seaswork.com
Fri May 30 12:24:39 UTC 2008

Hi Sophie,

	about this

>   $(document).ready(function(){
>     $(".block").draggable();
>   });

	you will have to manage to initialize your dom elements somehow so it's

	and about

> html textArea
>   id: id;
>   script: (html jqElement id: id; draggable);
>   with: 'some stuff here'	

	"html jqElement id: id; draggable"  should let you with a draggable
object so I think you need to say something to it to behave somehow. I mean like
enable, disable etc. like this:

	html jqElement id: id; draggable enable

	html jqElement id: id; draggable destroy

	and about the draggable itself I think it don’t event need to be an
object itself which serializes to javascript. Is enough just to add the methods
in JQElement calling them by its name/arguments. An example qould be:


		self call: 'draggable'


		self call: 'draggable' argument: 'enable'

	and so on. This ends up about how the Seaside Scriptaculous
serialization technique works and take advantage of it to make use of jQeury on

	You can commit in the repo. Just make sure you add your extensions in
the 'jQueryUnstable' package. Metodology is to put there the recently added
code. Then and progrsively that unstable code will be "feeding" the stable one
(when convincing to be stable enough to do so).

	Today I'll be on IRC channel squeak and seaside at freenode if you want
to ask there.


Sebastian Sastre



> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org 
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre 
> de itsme213
> Enviado el: Viernes, 30 de Mayo de 2008 01:24
> Para: seaside at lists.squeakfoundation.org
> Asunto: [Seaside] Trying to extend jquery -- a question
> 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 
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the seaside mailing list