Making WordPress.org


Ignore:
Timestamp:
08/24/2016 08:22:35 PM (5 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Implement a tabbed interface for writing and previewing user contributed notes.

Also wraps form header in 'h3' tag so it appears in table of contents.

Props keesiemeijer.
See #1905.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php

    r3790 r3852  
    259259function header_js() {
    260260    // Output CSS to hide markup with the class 'hide-if-js'. Ensures the markup is visible if JS is not present.
    261     echo "<script type=\"text/javascript\">jQuery( '<style>.hide-if-js { display: none; }</style>' ).appendTo( 'head' );</script>\n";
     261    // Add class 'js' to the body element if JavaScript is enabled
     262    echo "
     263    <script type=\"text/javascript\">
     264        jQuery( '<style>.hide-if-js { display: none; }</style>' ).appendTo( 'head' );
     265        jQuery( function($) {
     266            $( 'body' ).addClass('js');
     267        } );
     268    </script>\n";
    262269}
    263270
Note: See TracChangeset for help on using the changeset viewer.