A good fox does not eat his neighbor’s fowl!
-French proverb
I tried 11.04 along with Unity and went back to the fallback mode. Then I tried 11.10 where I couldnt go back to fallback mode. Like many people even I m dissatisfied with the ‘interface’ level development on Ubuntu with Gnome 3. I felt the same dissatisfaction with Fedora as well. I am fond of minimalistic layouts when it comes to GUI and anything that’s added just to prep the user experience visually, generally turns me off. Mac OS is the only exception though I have a list of pet peeves when it comes to the Mac OS as well.
Anyway, so I decided to go back to Ubuntu 10.04 coz its definitely going to be supported till 2013 and I m hoping by then the Linux distros will stop trying to match up with the Mac in terms of visual layout and instead focus on its own intrinsic beauty which can be felt even through a classic Clearlooks theme on any distribution using Gnome 2.
Anyway, so I ve digressed enough. This post is supposed to be just a reminder for me on how to upgrade the default Firefox on Ubuntu. 10.04 uses Firefox 3.6.23 when Firefox has released version 5, 6, 7 and very recently 8 in 2011 itself. Mozilla had announced this development plan so its okay I suppose but overall I m not too happy with a company making so many major version changes in the same year!
To upgrade the Firefox version to the most recent one, you ll need to run the usual update and upgrade commands on apt-get and then add the following ppa to the Ubuntu repository list:
sudo add-apt-repository ppa:mozillateam/firefox-next
After that again
sudo apt-get update
sudo apt-get upgrade
And Firefox should be at its most recent offering which is 8 as of today.




How to create sticky table headers using jQuery
Here s a nice way to use jQuery and make table headers sticky when a page is scrolled down and the table headers reach the top. This is a feature in the new look that Google is sporting, in Google documents, Gmail etc. Obviously Google is not using jQuery to accomplish this and they are probably using some fancy code to do it. This is just a quick way to get it working on table headers.. <th> elements. In this setup we calculate the distance of the table from the top, check if it reaches 0 while scrolling and apply the CSS property position:fixed to it. If it falls back under the distance it had, then we revert the position to normal.
Pass in the table’s id to the function that follows it. For example if you have a table that had an id = “my_table”, then pass this in the document.ready function:
$(document).ready(function(){makeTableHeadersSticky("#my_table");
});
function makeTableHeadersSticky(tableId){
//collect widths of all the th elements
var thArr = $(tableId + " th");
var thWidthsArr = []; //an array to hold the auto calculated widths of each <th> element
$(tableId + " th").each(function(){
thWidthsArr.push($(this).css("width"));
});
var pos = $(tableId).offset();
var thTop = pos.top + "px"; //this is the distance of the table from the top, we ll need to make the headers sticky when this distance is 0
//set the widths of the first and last tr's ths/tds... this is done coz in some cases, the widths will get messed up if the data was generated dynamicallyvar count = 0;
$(tableId + " tr:first-child>th").each(function(){
$(this).css("width", thWidthsArr[count]);
count++;
});
count = 0;
$(tableId + " tr:last-child>td").each(function(){
$(this).css("width", thWidthsArr[count]);
count++;
});
$(window).scroll(function(){if($(window).scrollTop() > pos.top)
{
$(
tableId +" tr:first-child").css("position", "fixed");$(
tableId +" tr:first-child").css("top", "0px");}
else
{
$(
tableId +" tr:first-child").css("position", "relative");$(
tableId +" tr:first-child").css("top", thTop);}
});
}