Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery "floating" tab like GetSatisfaction

I want to create a tab/widget/thingymajiggy like the feedback-thing in this picture:

alt text

That behaves like this. I just need to redirect on click, I don't need all the other stuff.

I have been unable to find a JQuery plugin, that does this - but maybe I just don't know the correct term.

...And yes, I could just pillage getsatisfaction, but I would much rather have a nice tried and tested JQuery plugin.

like image 321
Kjensen Avatar asked Jul 06 '09 22:07

Kjensen


2 Answers

You don't really need Javascript for this. This is achieved by giving an element a position of fixed:

<a id="floating_link" href="whatever.html">Go Somewhere</a>

#floating_link {
     position: fixed;
     right: 0;
     top: 400px;
     display: block;
     width: 50px;
     height: 125px;
     text-indent: -10000px;
     background-image: url(/my/image.jpg);
     overflow: hidden;
}

Unfortunately, IE6 doesn't support fixed. You can get around that by using this plugin.

If you don't care about IE6, then you can just use the above. The only difference is that IE6 will treat it as an absolute element (so it won't scroll down with the page, which isn't a big deal)

Here is an example of it at work. As you can see the entire area is clickable.

like image 143
Paolo Bergantino Avatar answered Nov 16 '22 05:11

Paolo Bergantino


Here is a great reference as well: http://www.building58.com/examples/tabSlideOut.html

like image 3
Martin Avatar answered Nov 16 '22 05:11

Martin