niftycube.js

Hi guys,

I started using NiftyCude today with Rails.

I copied :
- niftyCorners.css to ../public/stylesheets
- niftycube.js to ../public/javascrips

And I added : <% stylesheet_link_tag "niftyCorners", :media => "screen"
%> to my view, but for one reason or another I do not get rounded
corners.

Any ideas what I could be missing / doing wrong?

Thanks

Johannes

Hi,
You need to add the javascript file as well. The javascript file will actually include the css file for you, so you should even need to add that one.

<%= javascript_include_tag :defaults, 'niftycube' %>

-Eric Goodwin

plotzeling@hotmail.com wrote:

Thanks Eric,

I tried it but no happiness :frowning:

In my dos window I see it load load the js and the css but nothing
seems to happen

I'm stumped and I'm giving it a break and will try again tomorrow it
has been a loong day.

Johannes

you need to set the window.onload. something like this in your HTML :

Thanks Ed,

But its all there in my header. I'm stumped.

Johannes

The niftycube.js file looks for the niftycorners.css file in the same
directory. In order for it to find the css file in the stylesheets
directory edit the niftycube.js file replace this line

l.setAttribute("href","niftyCorners.css");

with

l.setAttribute("href","/stylesheets/niftyCorners.css");

Roland