JavaScript Tool: Nifty Corners Cube(tm)

The first JavaScript tool I want to mention is Nifty Corners Cube by Alessandro Fulciniti.  This is a great little utility for rounding the corners on your html elements without using time consuming images and it is very simple to use.

 A simple example:
Include this in the head:
<script type="text/javascript" src="niftycube.js" mce_src="niftycube.js"></script>
<script type="text/javascript">
NiftyLoad = function () {
  Nifty("div#tableOfContents","normal");
}
</script>

And that’s pretty much it. Nifty Corners Cube has a list of options to use inside Nifty(), so check it out. They also have layout examples, which look really awesome, but I haven’t looked into it, but I will and may post something about it.

There is one trick to using Nifty Corners Cube . There is a small bug when using Nifty Corners Cube with Internet Explorer. Luckily for me my friend Casey Pettingill discovered the same bug and told me what was happening.

Nifty Corners Cube won’t work in IE if you do not write your color values in their HEX values (ie. #ff0000) instead of their name (ie. red).

I think that this is a great tool, and one worth looking into. If you know of any other tricks or tips for using this tool, be sure to let me know. Also, if you have discovered any useful tools for programming, let us know that as well. Thanks.

Advertisements

8 thoughts on “JavaScript Tool: Nifty Corners Cube(tm)

  1. Every one seems to like this post. I would be interested in seeing why everyone likes Nifty Corners Cube(tm).

    I would also like to make some improvements to it. Don’t misunderstand me; it is a great tool. However, when using Nifty Corners you cannot implement drag and drop without seeing the color in the corners of the elements you rounded with Nifty Corners.

  2. I’ve known about Niftycube for some time but have only recently experimented with implementing it. My experience to date is that it works like a dream for Firefox and Safari, but is very buggy in Explorer for Windows, to the extent that I’m ditching it and reverting to some other techniques.

  3. Jonathan, what other techniques are you using? I have seen some psuedo javascript drawing functions, which I have thought about using, but haven’t found the time yet. And then of course you can use images.

  4. Archi-K, no problem. In short you can put the file anywhere you want as long as you point your page to it using the script tag. For example, if you place the niftycube.js file in the same directory as your html file, you would do this:

    <script type=”text/javascript” src=”niftycube.js”></script>l;

    and then place the script tag inside the head tag of the html page like this:

    <html>
    <head>

    <title> My Page</title>

    <script type=”text/javascript” src=”niftycube.js”></script>

    </head>

    I hope that helps.

    update

    After looking at the search terms used, I realized you may be wondering how to use NiftyCorners in WordPress. On a hosted blog like this, I would have to say: “I don’t know” and “I’m not sure that they would let you” though I haven’t explored it much, but if you host your own blog it is easy enough to add anything you want.

  5. >After looking at the search terms used, I realized you may be wondering how to use NiftyCorners in WordPress.

    🙂 Actually I was, good detective work. I host my own wordpress site and I think I have got the js file to load now. Thanks for your help.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s