12 | | jQuery(function() { |
13 | | jQuery('#dashboard_incoming_links div.dashboard-widget-content').not( '.dashboard-widget-control' ).find( '.widget-loading' ).parent().load('index-extra.php?jax=incominglinks'); |
14 | | jQuery('#dashboard_primary div.dashboard-widget-content').not( '.dashboard-widget-control' ).find( '.widget-loading' ).parent().load('index-extra.php?jax=devnews'); |
15 | | jQuery('#dashboard_secondary div.dashboard-widget-content').not( '.dashboard-widget-control' ).find( '.widget-loading' ).parent().load('index-extra.php?jax=planetnews'); |
16 | | jQuery('#dashboard_plugins div.dashboard-widget-content').not( '.dashboard-widget-control' ).find( '.widget-loading' ).parent().load('index-extra.php?jax=plugins'); |
17 | | }); |
| 12 | jQuery(function($) { |
| 13 | var ajaxWidgets = { |
| 14 | dashboard_incoming_links: 'incominglinks', |
| 15 | dashboard_primary: 'devnews', |
| 16 | dashboard_secondary: 'planetnews', |
| 17 | dashboard_plugins: 'plugins' |
| 18 | }; |
| 19 | $.each( ajaxWidgets, function(i,a) { |
| 20 | var e = jQuery('#' + i + ' div.dashboard-widget-content').not('.dashboard-widget-control').find('.widget-loading'); |
| 21 | if ( e.size() ) { e.parent().load('index-extra.php?jax=' + a); } |
| 22 | } ); |
| 23 | }); |