Very very cool, Rick! -- T.J. :-)
On Jun 12, 11:33 pm, Rick Waldron <waldron.r...@gmail.com> wrote: > Geneva Switzerland? It was named after this city. The idea being its a > "convention" between two "super powers" :) > > Rick > > On Fri, Jun 12, 2009 at 5:25 PM, Tobie Langel <tobie.lan...@gmail.com>wrote: > > > > > GenevaJS ? IS there any relation to my homwtown ? Or is that purely > > coincidental? > > > Best, > > > Tobie > > > On Jun 12, 7:45 pm, Rick Waldron <waldron.r...@gmail.com> wrote: > > > TJ, > > > > Al MacDonald of Processing.js used GenevaJS in a presentation last > > night... > > > he wanted to use Box2D.js (a prototype extension) but he's not familiar > > with > > > Prototype syntax... anyway its now posted on our site, with links to his > > > presentation. > > > > I dont see it as a tool for people making the move... no movement at all. > > I > > > see it as a tool to reduce the amount of code we're writing. Or perhaps > > for > > > a jQuery developer that gets a job at a prototype shop... there are many > > > scenarios. We're planning on meeting with the Boston Rails Group soon to > > > discuss working with them to build it into Rails as a helper to > > prototype... > > > as I mentioned it gzips to 3k. > > > > Also - GenevaJS is sideways compatible, for example: > > > > $('.classname').eq(1).highlight(); > > > > eq(1) - jquery method for showing the element at index 1 of > > $('.classname'), > > > it will get highlight()'ed from effects.js > > > > (yeah... that example is super simple.. but i've been doing some zany > > stuff, > > > which i intend to post) > > > > Anyway, that example:http://genevajs.com/demos/demo-box2d.php > > > > I've made us way off topic. sorry about that. anyone with questions can > > > email me directly. > > > > Rick > > > > On Fri, Jun 12, 2009 at 11:08 AM, T.J. Crowder <t...@crowdersoftware.com > > >wrote: > > > > > Hi Rick, > > > > > Sounds cool for people making the move over, or more importantly > > > > trying to use/port jQuery plug-ins for use in Prototype. > > > > > I think I'd suggest anyone writing *new* code use the native API > > > > unless they expect to ditch Prototype for jQuery. :-) But very cool > > > > for other purposes! > > > > > -- T.J. :-) > > > > > On Jun 12, 3:33 pm, Rick Waldron <waldron.r...@gmail.com> wrote: > > > > > I'm developing a library that will allow this sort of syntax. > > Actually, > > > > it > > > > > allows you write jQuery syntax in Prototype, giving $() that power of > > > > $$() > > > > > > I've created a use case of your question. > > > > > >http://genevajs.com/demos/demo-set-opacity.php > > > > > > If you view source on the page, you'll see i'm calling prototype.js > > and > > > > > genevajs (this is MY version, its filled with JUNK, please do not use > > > > this). > > > > > GenevaJS allows me to write jQuery syntax in the Prototype > > environment. > > > > > Compressed and g-zipped it comes it at 3k > > > > > > Rick > > > > > > On Fri, Jun 12, 2009 at 3:11 AM, Alex McAuley < > > > > > > webmas...@thecarmarketplace.com> wrote: > > > > > > > .. which if you want a quick answer would be ... > > > > > > > $$('img.alpha').each(function(element) { > > > > > > > $(element).setOpacity(0.5); > > > > > > > }); > > > > > > > ----- Original Message ----- > > > > > > From: "T.J. Crowder" <t...@crowdersoftware.com> > > > > > > To: "Prototype & script.aculo.us" < > > > > > > prototype-scriptaculous@googlegroups.com> > > > > > > Sent: Friday, June 12, 2009 8:07 AM > > > > > > Subject: [Proto-Scripty] Re: setOpacity issue > > > > > > > Hi, > > > > > > > > $$('img.alpha').setOpacity(0.5); > > > > > > > $$ returns an array[1][2], and arrays don't have a setOpacity > > method. > > > > > > You want to call the setOpacity method on each element in the > > array, > > > > > > which you can do in a variety of ways thanks to Prototype's > > Enumerable > > > > > > [3] mix-in, which it mixes in with arrays. In this case, probably > > > > > > Enumerable#invoke[4]. > > > > > > > [1]http://prototypejs.org/api/array > > > > > > [2] > > >https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global. > > > > .. > > > > > > [3]http://prototypejs.org/api/enumerable > > > > > > [4]http://prototypejs.org/api/enumerable/invoke > > > > > > > HTH! > > > > > > -- > > > > > > T.J. Crowder > > > > > > tj / crowder software / com > > > > > > Independent Software Engineer, consulting services available > > > > > > > On Jun 12, 12:28 am, Brown Freelance <sc...@brownfreelance.com> > > wrote: > > > > > > > Not sure what I'm doing wrong here but here is my problem: > > > > > > > > I have a few images that I want to display with 50% opacity. I've > > > > > > > given these images the class name of alpha. > > > > > > > > Example: > > > > > > > <img src="../images/snapshots/thumbs/gma_x158.gif" alt="Greg > > Martin > > > > > > > Auctions" width="156" height="118" class="alpha" /> > > > > > > > > Then, after the body tag I have: > > > > > > > <script language="javascript" type="text/javascript"> > > > > > > > $$('img.alpha').setOpacity(0.5); > > > > > > > </script> > > > > > > > > This does not work for me. It dose work however work if I give > > the > > > > img > > > > > > > element an ID but that of course is not valid CSS if I use more > > then > > > > > > > one and I would rather not give each img their own ID. > > > > > > > > Any help would be greatly appreciated. > > > > > > > > Thanks. > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---