Skip to content

Instantly share code, notes, and snippets.

@ramzesimus
Created October 1, 2012 08:48
Show Gist options
  • Save ramzesimus/3810391 to your computer and use it in GitHub Desktop.
Save ramzesimus/3810391 to your computer and use it in GitHub Desktop.
JavaScript: Smart Divider
/* Footer Info Block */
function divider () {
jQuery('.info-block li').each(function(){
left_item_width = jQuery(this).find('.left-item').width();
item_width = jQuery(this).width() - left_item_width - jQuery(this).find('.right-item').width();
jQuery(this).find('.divider').css({'width': (item_width-4), 'left': (left_item_width+2)+'px'});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment