Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




add_js [ WordPress Function ]

add_js ( No parameters )
Defined at:

Soorgelijke functies: add_user, add_role, add_meta, add_ping, add_link


Display JavaScript on the page.

Source


<?php
function add_js() {
?>
<script type="text/javascript">
//<![CDATA[
    jQuery(document).ready(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').change(check_disabled);
    });
//]]>
</script>
<?php
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics