[Proto-Scripty] Scoping prototype

2009-03-15 Thread seasoup
Is it possible to contain prototype in a scope like: (function() { use prototype here })(); cant use it here, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this

[Proto-Scripty] Re: Taboo Subject

2009-02-11 Thread seasoup
I'd say its a trade off of time money vs market share. How important to the companies success is it to get that 5% market share with javascript turned off? Is it really worth spending twice as long on? Probably not, probably at most worth 5% of your time. Redirect them to a page telling them

[Proto-Scripty] Re: Javascript scope

2009-02-10 Thread seasoup
Basically every set of curly braces {} gives you new scope. This is one of the most confusing aspects of javascript. The above is not true. There are only two scopes in javascript, global and function () {} var a = 'hi'; for (var b = 0; b 10; b++) { alert(a); // alerts 'hi' }

[Proto-Scripty] Re: jQuery or Prototype ?

2009-01-20 Thread seasoup
From my time working with jQuery I couldn't find anything like Prototype's Class.create() lowpro.jquery.js - http://github.com/danwrong/low-pro-for-jquery/tree/master/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Proto-Scripty] Re: jQuery or Prototype ?

2009-01-20 Thread seasoup
Both Prototype and jQuery are excellent libraries. The only important thing is that you use one of them :) Ok, ok, mootools lovers... or mootools. sheesh. On Jan 20, 3:55 am, Jan Hansen j...@nhl-data.dk wrote: Hi all, Still more frequently I get or see the question: Should we use jQuery

[Proto-Scripty] Re: Simple question

2008-11-27 Thread seasoup
I think this is what you are trying to do: script: code script type=text/javascript language=javascript // ![CDATA[ function myeffect(obj) { $(obj).fade({ duration: 3.0, from: 0, to: 1 }); } // ]] /script /code html code div onclick=myeffect(this) Click me to fade

[Proto-Scripty] Re: Simple question

2008-11-27 Thread seasoup
$(selector).each(function(){ alert(this); }.bind($(somethingElse)); sets somethingElse as the 'this' inside of the each function, instead of the item in the array. That's what spradeepkumar was referring to by controlling scope. On Nov 27, 7:14 am, RobG [EMAIL PROTECTED] wrote: On Nov 27,

[Proto-Scripty] Re: Simple question

2008-11-27 Thread seasoup
oops, I was in jQuery mode. $('id').each(function(eachThing) { }.bind($('anotherId')); still binds another id to this inside of the each function. But for eventlisteners you need to .bindAsEventListener() On Nov 27, 7:14 am, RobG [EMAIL PROTECTED] wrote: On Nov 27, 11:32 pm, spradeepkumar