Archive for the ‘Javascript’ Category

jQuery and hidden items

Saturday, March 29th, 2008

Doing some resent work with jQuery a div that is initially hidden from the user, I went round in cirlces when I kept getting nothing when trying to get the div’s margin information via:

$('#myitem').offset()

I kept getting zero returned for the top and left margins. What I needed to do was to show() the div:

$('#myitem').show().offset().hide()

This allows me to get the margins, but ultimately keeps the div hidden from the user.

Hopefully, documenting this here will help someone if they run into in the future, or it’ll help me the future me if I ever forget.

Charting and Graphing with Javascript, Flash or API

Thursday, December 13th, 2007

There seems to be a lot of work around generating Charts and Graphs as over the past few months there have been several major graphing/charting projects to come to my attention.

Google Chart API - Most recently Google jumped into the graphing and charting arena by providing a REST API. This is another good move for Google and looks to be a solid first release, providing more initial documentation that I’ve seen in any of the Google API’s.

Open Flash Chart - These are really slick graphs and charts! Want interactive, easy to implement, and (yes, I’ll say it again) slick looking graphs and charts? Then have a look at Open Flash Chart (OFC) and you’ll quickly understand why I think it’s one of the best of the bunch. They have every type of graph or chart you’d need and make getting your data to the SWF file a snap. Just provide it with a data structure by using one of the many helpers for just about any language and you’ll have impressive graphs and charts in minutes. It’s gonna be interesting to see which major companies will come to use these graphs and charts.

Flot - Uses jQuery to produce some very nice graphs and charts. This is definitely a project to watch in the future.

Javascript CDN’s

Tuesday, November 20th, 2007

As a developer, I’m encouraged when I see projects like CacheFile.net. Yahoo was the first to start hosting their YUI files. Shortly there after, Dojo followed with AOL’s support.

Until CacheFile.net these were the only two libraries available on CDN’s. Now all of them are available. All of that said, I am slightly concerned that the project will run out of a budget quickly, unless a major sponsor (come on Amazon, here’s a great opportunity) steps forward. I’m interested to see who this develops.