Skip to content

Instantly share code, notes, and snippets.

@krugazul
Created October 11, 2018 06:24
Show Gist options
  • Select an option

  • Save krugazul/e9e9ff19aeb02c8d69bd3e3ae98d7373 to your computer and use it in GitHub Desktop.

Select an option

Save krugazul/e9e9ff19aeb02c8d69bd3e3ae98d7373 to your computer and use it in GitHub Desktop.
jQuery Element width Test
var lsx_width_test = function ( selector ) {
selector.children().each( function() {
console.log(jQuery(this).prop('nodeName') + ' - ' + jQuery(this).attr( 'class' ) + ' - ' + jQuery(this).width());
if ( 0 < jQuery( this ).children.length ) {
lsx_width_test( jQuery( this ) );
}
} );
};
lsx_width_test( jQuery( '#lsx-banner' ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment