WordPress/wp-admin/js/settings-box.js
markjaquith c295b4b8e8 Remove the other tab before sliding down.
git-svn-id: http://svn.automattic.com/wordpress/trunk@9561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-11-07 22:07:58 +00:00

35 lines
1.4 KiB
JavaScript

jQuery(document).ready( function($) {
$('#show-settings-link').click(function () {
if ( ! $('#screen-options-wrap').hasClass('screen-options-open') ) {
$('#contextual-help-link-wrap').addClass('invisible');
}
$('#screen-options-wrap').slideToggle('fast', function(){
if ( $(this).hasClass('screen-options-open') ) {
$('#show-settings-link').css({'backgroundImage':'url("images/screen-options-right.gif")'});
$('#contextual-help-link-wrap').removeClass('invisible');
$(this).removeClass('screen-options-open');
} else {
$('#show-settings-link').css({'backgroundImage':'url("images/screen-options-right-up.gif")'});
$(this).addClass('screen-options-open');
}
});
return false;
}).parent();
$('#contextual-help-link').click(function () {
if ( ! $('#contextual-help-wrap').hasClass('contextual-help-open') ) {
$('#screen-options-link-wrap').addClass('invisible');
}
$('#contextual-help-wrap').slideToggle('fast', function(){
if ( $(this).hasClass('contextual-help-open') ) {
$('#contextual-help-link').css({'backgroundImage':'url("images/screen-options-right.gif")'});
$('#screen-options-link-wrap').removeClass('invisible');
$(this).removeClass('contextual-help-open');
} else {
$('#contextual-help-link').css({'backgroundImage':'url("images/screen-options-right-up.gif")'});
$(this).addClass('contextual-help-open');
}
});
return false;
});
});