var attributeCounts = get( 'attributeCountList', array() ), JSON_FORCE_OBJECT ); ?>; $( ".catalog-filter-attribute li.attr-item" ).each( function( index, item ) { $(item).append( function() { var itemId = $(this).data( "id" ); if( attributeCounts[itemId] ) { var node = document.createElement( 'span' ); node.appendChild( document.createTextNode( attributeCounts[itemId] ) ); $(node).addClass( 'attr-count' ); return node; } $(this).addClass( 'disabled' ); }); }); get( 'attributeBody' ); ?>