> 1. 90% of the time, you'll figure out what's wrong in the process of
> doing it -- instant help!
Bingo!
So I worked out that it is because of this:
Event.addBehavior({
'.collapse:click' : function(e) {
var div = this.id;
new Effect.toggle(div + '-block','blind', {queue: 'end',
duration:
0.5});
},
});
Though, changing to what I logically would have thought it should be
hasn't worked:
$$('.collapse').observe('click', function() {
var div = this.id;
new Effect.toggle(div + '-block','blind', {queue: 'end',
duration:
0.5});
});
Suggestions?
Grant
On 01/12/2008, at 9:06 PM, T.J. Crowder wrote:
>
> Hi Grant,
>
>> And even after copy/paste of your code, I still get the error.
>
> You would do; as I said, the problem isn't in the code you quoted, so
> my changes to it don't matter other than removing an unnecessary call.
>
>> An example of where I have it in use is:
>
> Sorry, it's just not practical for other people to go digging around
> the full version. Again: Can you create a _small, self-contained
> page_ that demonstrates the problem. There are two reasons for doing
> this: 1. 90% of the time, you'll figure out what's wrong in the
> process of doing it -- instant help! 2. If not, it gives people
> trying to help you out a small, simple example of the problem.
> --
> T.J. Crowder
> tj / crowder software / com
>
> On Dec 1, 5:51 am, Grant Newton <[EMAIL PROTECTED]> wrote:
>> Thanks TJ
>>
>> An example of where I have it in use is:
>>
>> http://www.sydneycommunitycollege.com.au/courses/sport/dance
>>
>> And even after copy/paste of your code, I still get the error.
>>
>> Thanks
>>
>> Grant
>>
>> On 01/12/2008, at 4:35 PM, T.J. Crowder wrote:
>>
>>
>>
>>> Hi Grant,
>>
>>> You only need $() to extend elements that have not already been
>>> extended. $$() extends the elements it returns[1]. Also, the only
>>> reason to call $() is if you're doing something with the return
>>> value,
>>> which in the given code you're not.
>>
>>> [1]http://prototypejs.org/api/utility/dollar
>>
>>> Your code doesn't cause an error at my end in IE6 (and does hide the
>>> relevant bits), but again, you dont need the $() call, so you can do
>>> this instead:
>>
>>> document.observe('dom:loaded', function() {
>>> $$('.blockbody').invoke('hide');
>>> $$('.hint').invoke('hide');
>>> $$('.reason').invoke('hide');
>>> });
>>
>>> The problem must lie elsewhere. Can you create a small, self-
>>> contained page that demonstrates the problem and poast it to Pastie?
>>> Along the way you may figure out the problem, and if not, it'll give
>>> the folks here something complete to help you with.
>>
>>> HTH,
>>> --
>>> T.J. Crowder
>>> tj / crowder software / com
>>
>>> On Dec 1, 12:33 am, grant <[EMAIL PROTECTED]> wrote:
>>>> Hello all
>>
>>>> I am having a little trouble with IE6 and this snippet of code:
>>
>>>> document.observe('dom:loaded', function() {
>>>> $(
>>>> $$('.blockbody').invoke('hide'),
>>>> $$('.hint').invoke('hide'),
>>>> $$('.reason').invoke('hide')
>>>> );
>>>> });
>>
>>>> I've done some searching to try and work out why I am receiving the
>>>> error:
>>
>>>> "Object doesn't support this property or method"
>>
>>>> Wiki docs suggest wrapping with $(), though I don't think I have
>>>> done
>>>> that properly. Any help is much appreciated.
>>
>>>> Grant
>>
>>
> >
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---