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 [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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" <[hidden email]> 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 _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Sophie424
Hi Sophie,
about this > $(document).ready(function(){ > $(".block").draggable(); > }); you will have to manage to initialize your dom elements somehow so it's ok. 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 dont 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: JQElement>>draggable self call: 'draggable' JQElement>>enableDraggable 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 seaside. 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. cheers, Sebastian Sastre > -----Mensaje original----- > De: [hidden email] > [mailto:[hidden email]] En nombre > de itsme213 > Enviado el: Viernes, 30 de Mayo de 2008 01:24 > Para: [hidden email] > 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 > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |