Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to know, what script drives the "screen options" animation toggle in WordPress.

I'm referring to the options menu that slides out when the admin clicks the "Screen Options" link near the upper right corner of the window in the Post, or Page, or Categories, etc. – and slides back in when the same link is clicked again.

Would appreciate it if someone knowledgeable could show me the exact location of that JavaScript code snippet.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

This is in wp-admin/js/common.js or wp-admin/js/common.min.js:

// Scroll into view when focused
$('#contextual-help-link, #show-settings-link').on( 'focus.scroll-into-view', function(e){
    if ( e.target.scrollIntoView )
        e.target.scrollIntoView(false);
});

Found with a search for show-settings-link in the complete source. :)

share|improve this answer
    
Thank you, @toscho! –  Astoria Apr 26 '13 at 13:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.