wpseek.com
A WordPress-centric search engine for devs and theme authors
options_reading_add_js › WordPress Function
Since3.5.0
Deprecatedn/a
› options_reading_add_js ( No parameters )
Defined at: |
|
Codex: |
Display JavaScript on the page.
Source
function options_reading_add_js() { ?> <script type="text/javascript"> jQuery( function($) { var section = $('#front-static-pages'), staticPage = section.find('input:radio[value="page"]'), selects = section.find('select'), check_disabled = function(){ selects.prop( 'disabled', ! staticPage.prop('checked') ); }; check_disabled(); section.find( 'input:radio' ).on( 'change', check_disabled ); } ); </script> <?php }