"); newEventWrapper.append( newEvent); jQuery('.dashboardEvents.events_list').append( newEventWrapper); } } } catch(err) { console.log(err); // if this fails, just do old method jQuery('.dashboardEvents.events_list').html(""); //for(i = 0; i < eventArray.length; i++) //only display the first 5 events. itemCount = eventArray.length; if (itemCount > 5) { itemCount = 5; } for(i=0; i'); var newEvent = jQuery(''); newEvent.append( "