Install Firefox 4 Beta 2 on Fedora 13

Mozilla just released Firefox j 4 Beta 2 with a cool set of features and I want to test it. I installed the first beta manually in my desktop pc running Fedora 13, but I was wondering if there is a better way. Fortunately, there is one: you can install Firefox 4 Beta 2 using Remi’s repo, here is how:

First you need to configure the repo, so you need to run the following snippet as root

[codesyntax lang=”bash”]


Then you can install the beta release of firefox using:

[codesyntax lang=”bash”]


You may need to anser ‘Yes’ to the question about if you want to import the GPG key for the repo. And… that’s all. now you can see for yourself what Firefox 4 Beta 2 can do.

Finally, this is not an update of the firefox package you probably already have installed, it only adds another entry to your Applications menu allowing you to run the new versión of Firefox.

You can see more information in Remi’s post and Remi’s repo configuration page.

Get height of a hidden element using jQuery

It’s known that hidden elements doesn’t take space in the document unless they are not really hidden but invisible, using visibility:hidden.

Sometimes you need to know something about a hidden element before you actually show it, let’s say the height property of a DIV element. You can easily get that property value making the element displayable but invisible, that way the element would take space in the document and you can get the height or any other property value that isn’t available while the element is hidden.

The following code is a small jQuery plugin that takes a function as argument. The plugin clones a jQuery element, make it displayable but invisible, then inserts the clone right after the original element, executes the function on the context of the cloned element and returns the function result. The clone is removed from the DOM after the passed function returns.

To solve the problem of the height property I explained above you could use the following code:

[codesyntax lang=”javascript”]


jQuery TimePicker

jQuery TimePicker is a plugin to help users easily input time entries. It works by allowing the user to type times in a free format or selecting them from a dropdown menu.

The plugin will automatically convert all time entries to a format that can be changed passing the timeFormat option; the default value is hh:mm p which will give something like ’02:16 PM’. The following are a few examples of the supported “formats”:

  • 1234 will be converted to 12:34 AM
  • 1234 p will be converted to 12:34 PM
  • 456 will be converted to 04:56 AM
  • 1656 will be converted to 04:56 PM
  • 1:1 P will be converted to 01:10 PM
  • 1:9 A will be converted to 01:09 AM
  • 8:59 will be converted to 08:59 PM
  • 1:20:30 will be converted to 01:20:30 PM
  • 46 will be converted to 05:00 AM (4 hours plus 60 minutes)

There are other supported formats, all inspired by the behavior of a similar timepicker used in Google Calendar.

To learn how to use the plugin and more, visit the official page.