.item.active ~ .item.active:before {
content: ', ';
}
#ranking li div { float: left; display: none;}
#ranking li div.r {background-image: ...}
#ranking li.r div.r { display: block; }
function loadXML() { return $.ajax({ url: 'data.xml', dataType: 'xml' }); } function loadMap() { dfd = $.Deferred(); var script = document.createElement("script"); script.type = "text/javascript"; script.src = "http://maps.google.com/maps/api/js?sensor=false&callback=finishMapLoading"; document.body.appendChild(script); return dfd.promise(); } function finishMapLoading() { dfd.resolve(); } function loadData() { var LMap = loadMap(); var LXML = loadCoupons(); $.when( LMap, LXML ).then( function() { doSomethingAwesome(); }); } window.onload = function() { loadData(); }