Click link on plugin/theme page and open the contextual help on a specific tab

Maybe the Q is bordering the off-topic, but IMO interesting in WordPress context.

I’ve tested this directly in FireBug, in the Dashboard page (wp-admin/index.php).

var $ =jQuery.noConflict();

// Remove 'active' class from all link tabs
$('li[id^="tab-link-"]').each(function(){
    $(this).removeClass('active');
});

// Hide all panels
$('div[id^="tab-panel-"]').each(function(){
    $(this).css('display','none');
});

// Set our desired link/panel
$('#tab-link-help-content').addClass('active');
$('#tab-panel-help-content').css('display','block');

// Force click on the Help tab
$('#contextual-help-link').click();

Leave a Comment