Hi All,
In scriptaculous scripts, I don''t understand this syntaxe : $(element)
--8<---------------------------------
Effect.Highlight = Class.create();
Object.extend(Object.extend(Effect.Highlight.prototype,
Effect.Base.prototype), {
initialize: function(element) {
this.element = $(element);
...
--8<---------------------------------
I had never seen this syntaxe, I doesn''t know where I have to search
and google doesn''t like $ in request :/
Thanks in advance for any explanations or urls,
Nicolas Terray
Hi Nicolas,
$(element) is part of the prototype framework. It''s a shortcut for:
document.getElementById()
http://www.sergiopereira.com/articles/prototype.js.html
-Daniel Elmore
-----Original Message-----
From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]
On Behalf Of
Nicolas Terray
Sent: Thursday, December 08, 2005 4:06 AM
To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: [Rails-spinoffs] What does mean $(element) ?
Hi All,
In scriptaculous scripts, I don''t understand this syntaxe : $(element)
--8<---------------------------------
Effect.Highlight = Class.create();
Object.extend(Object.extend(Effect.Highlight.prototype,
Effect.Base.prototype), {
initialize: function(element) {
this.element = $(element);
...
--8<---------------------------------
I had never seen this syntaxe, I doesn''t know where I have to search
and google doesn''t like $ in request :/
Thanks in advance for any explanations or urls,
Nicolas Terray
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On 12/8/05, Daniel Elmore <danielelmore-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Nicolas, > > $(element) is part of the prototype framework. It''s a shortcut for: > document.getElementById() > > http://www.sergiopereira.com/articles/prototype.js.html >Thanks a lot for your answer. I thought that it was a syntax for references (like & in php) or some javascript-specific stuff... :) Nicolas Terray
> > http://www.sergiopereira.com/articles/prototype.js.htmlDo you have other great urls like that about prototype in your bookmarks ? Nicolas Terray
For Beginners this one should be fine: http://particletree.com/features/quick-guide-to-prototype/ This won''t probably help you too much, but you can take a look: http://blogs.ebusiness-apps.com/jordan/pages/Prototype%20Library%20Info.htm Hope this helps! Thank you, Mandy.
Not to mention the Script.aculo.us docs which improve all the time: http://wiki.script.aculo.us/scriptaculous/show/Prototype On 12/8/05, Maninder, Singh <mandiv@corp.untd.com> wrote:> For Beginners this one should be fine: > http://particletree.com/features/quick-guide-to-prototype/ > > This won't probably help you too much, but you can take a look: > http://blogs.ebusiness-apps.com/jordan/pages/Prototype%20Library%20Info.htm >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hi Nicolas, I found mos usefull explanation of prototype.js here: http://www.sergiopereira.com/articles/prototype.js.html. Explanation of $() function is just at the top! Regards Janko Nicolas Terray wrote:>>>http://www.sergiopereira.com/articles/prototype.js.html > > > Do you have other great urls like that about prototype in your bookmarks ? > > Nicolas Terray