You shouldn't reference document.id at all unless you are writing plugins
for others to consume or you want to use other code that also uses $ (like
jQuery).

2009/8/1 Fábio M. Costa <[email protected]>

> What i do is:
>
> (function(){
>    var $ = document.id || $;
>    // your code
> })();
>
> This will make the dollar function work on all 1.2 versions.
> Of course that if you are using others framework in the same page you
> should pay some attention.
>
>
> --
> Fábio Miranda Costa
> Solucione Sistemas
> Front-End Engineer
> http://meiocodigo.com
>
>
>
> On Sat, Aug 1, 2009 at 9:59 AM, Thierry bela nanga <[email protected]>wrote:
>
>> window.$ = document.id;
>>
>>
>> On Sat, Aug 1, 2009 at 1:56 PM, hamburger <[email protected]> wrote:
>>
>>>
>>> Within the new mootools-1.2.3.1-more.js are some changes. The $
>>> function has become document.id().
>>>
>>> I have the following small code:
>>> document.id('gototop').set('opacity','0').setStyle('display','block');
>>> window.addEvent('scroll',function(e) {document.id('gototop').fade
>>> ((window.getScroll().y > 300) ? 'in' : 'out')});
>>> but it doesn't work.
>>>
>>> like this and with the old version 1.2 it works very well.
>>> $('gototop').set('opacity','0').setStyle('display','block');
>>> window.addEvent('scroll',function(e) {$('gototop').fade
>>> ((window.getScroll().y > 300) ? 'in' : 'out')});
>>>
>>> somebody can help?
>>> thx
>>
>>
>>
>>
>> --
>> fax : (+33) 08 26 51 94 51
>>
>
>

Reply via email to