[Pro] Protaculous Action- Please help utilizing prototype lib

Hey All,

I am new to Freeway and am really enjoying myself.

Following the instructions by Walt in an older post I am trying to get used to using his protaculous action to add some prototype functionality to my site. I am having a bit of a struggle and am sure it is a simple step I have accidentally omitted or have done incorrectly.

Some assistance would be greatly appreciated.

below is the instructions as set out by walt:


To make your effect as outlined below, get the name of your image from Freeway’s Inspector. (Best to name it yourself, perhaps something meaningful like toggleMe.)

When you make your link to trigger the effect, don’t add the function call, just be sure to add an ID to it, using the Extended dialog, perhaps something meaningful like clickMe. The resulting link code would be:

<* href=“#” id=“clickMe”>toggle the effect</*>

(I have replaced ‘a’ with ‘*’ because I dont know how to paste code into the forum without it being rendered as html)

Apply the Protaculous action to the page, selecting Prototype as the library to load. (The Scriptaculous library is not needed for toggle, because Effect.toggle is just a wrapper for Element.toggle, which is native to Prototype. Save your visitors a whopping 200kB of JavaScript library download if you can!)

Click the Function Body button in the Actions palette, and put the following function in the dialog:

if($(‘toggleMe’) && $(‘clickMe’)) { $(‘toggleMe’).hide(); new Event.observe(‘clickMe’,’mouseover’,function(){ $(‘toggleMe’).toggle(); }); }

Okay the dialog, and publish your page.

Now, with no added code within the body of your page, the effect is applied to the elements and the effect works. If the browser doesn’t load the JavaScript, then your hidden element appears anyway, so nobody gets denied the content - just the effect added to it. You can (and should) test this by turning off JavaScript in your browser and re-loading your page.

Also, I had no trouble previewing locally, even in Freeway, when I follow these steps.

Walter


I followed the instructions (I think) but am not getting a result.

I have zipped the files here

If someone wouldn’t mind having a look that would be fantastic!

Many Thanks,

Nathan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options