Presidents of USA and their Birth Signs – Sankey Visualization

In this analysis, we will visualize the relation between the Age at Presidency, State of Birth and birth sign.

Read more at: www.infocaptor.com/dashboard/presidents-of-usa-and-their-birth-signs-sankey-visualization

Comments Off on Presidents of USA and their Birth Signs – Sankey Visualization

Bigfoot vs UFO analytics

Bigfoot and UFO remain elusive but know their ways to make news from time to time.

Read more at: http://www.infocaptor.com/dashboard/bigfoot-vs-ufo-analytics

Comments Off on Bigfoot vs UFO analytics

What is the most dangerous food at Olive Garden?

Olive Garden is one of the favorite destination for Italian food and today we got hold of the entire Olive Garden menu along with their nutrition data.

A typical meal at Olive Garden starts with a drink, appetizers [free bread sticks], main dish and finally the desert.

So going in the same sequence let see what the data menu for Wine and Beer has to offer.

Amount of Carbs per serving in your favorite Wine at Olive Garden

Read more at: http://www.infocaptor.com/dashboard/what-is-the-most-dangerous-food-at-olive-garden

Comments Off on What is the most dangerous food at Olive Garden?

Reddit 10 year growth analysis and visualization

In this article we will analyze the 10 year growth history of Reddit using simple visualizations.

Read more http://www.infocaptor.com/dashboard/reddit-10-year-growth-analysis-and-visualization

Comments Off on Reddit 10 year growth analysis and visualization

Marriage and Divorce Rates Analysis Dashboard CDC Data set

Marriage rates by Census region

Read more at: www.infocaptor.com/dashboard/marriage-and-divorce-rates-analysis-dashboard-cdc-data-set

Comments Off on Marriage and Divorce Rates Analysis Dashboard CDC Data set

jquery : Parent Detail Table rows

Categories: jQuery

How to build master detail table using jquery

I found this jquery trick and I am reposting it for my own reference here

http://www.javascripttoolbox.com/jquery/

Expandable “Detail” Table Rows

The only requirements are:
Put a class of “parent” on each parent row (tr)
Give each parent row (tr) an id
Give each child row a class of “child-ID” where ID is the id of the parent tr that it belongs to

 

Example Code
$(function() {
$(‘tr.parent’)
.css(“cursor”,”pointer”)
.attr(“title”,”Click to expand/collapse”)
.click(function(){
$(this).siblings(‘.child-‘+this.id).toggle();
});
$(‘tr[@class^=child-]’).hide().children(‘td’);
});

 

Tree Structure

Example Code
$(function() {
$(‘div.tree div:has(div)’).addClass(‘parent’); // Requires jQuery 1.2!
$(‘div.tree div’).click(function() {
var o = $(this);
o.children(‘div’).toggle();
o.filter(‘.parent’).toggleClass(‘expanded’);
return false;
});
});

Example CSS
div.tree div {
padding-left:16px;
}
div.tree div.parent div {
display:none;
cursor:default;
}
div.tree div.parent {
cursor:pointer !important;
background:transparent url(plus.gif) no-repeat top left;
}
div.tree div.expanded {
background:transparent url(minus.gif) no-repeat top left;
}

Comments Off on jquery : Parent Detail Table rows

jquery circular list : cool but is it useful?

Categories: jQuery

This plugin maybe cool but I find it difficult to understand how useful it could be

http://playground.mobily.pl/jquery/mobily-blocks/demo.html

Comments Off on jquery circular list : cool but is it useful?

javascript compilers – languages that convert to javascript

Categories: jQuery

List of languages that compile to JS

If you are coding directly in javascript framework like jQuery, mootools, YUI etc then the list may not be useful but the following list will give you options to code your web application

https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS

Comments Off on javascript compilers – languages that convert to javascript

Align Div Bottoms using jQuery

Categories: jQuery

jQuery is so awesome! Trust me, I have been developing InfoCaptor using Java and if there was something similar like jQuery for Java, it would have been truly great.

Can you imagine the amount of code that would have gone in writing a simple thing like aligning bottoms of multiple frames on the same page.

Using jQuery it is just few lines as below

//find the max bottom
var maxY = 0;
$(“.ui-selected”)
.each(
function()
{
maxY = Math.max(maxY, $(this).position().top + $(this).height());
}
);

//loop through each selected and now find the new top based on the maxY and apply it to each
$(“.ui-selected”)
.each(
function()
{
var h=$(this).height();
var newTop = maxY-h;
if (newTop>=0) $(this).css({top:newTop});
}
);

 

I am using two loops, first is to get the bottom Y position and then the second loop to apply the bottom y to each Div. There is a way in jQuery using command chaining but I just kept them two separate for easy reading.

Comments Off on Align Div Bottoms using jQuery