add_js [ WordPress Function ]
add_js ( No parameters )
| Defined at: |
|
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
- drupal_add_js | common.inc | Drupal 7 | Drupal API
Having the ability to conditionally load js files depending on browser would help cross browser compatibility tremendously. add_js can be a little to stern to deal ...
api.drupal.org - Codeigniter Template library, add_js() method - Stack Overflow
using This Template Library. when i try and use the add_js() function it ... What is your code? ... sorry different computer now. here is the controller ...
stackoverflow.com - jquery - drupal 7 add_js Weight - Stack Overflow
You can set the weight by passing an $options array into drupal_add_js(): $file = drupal_get_path('module', 'sb_carousel').'/js/slide.js'; $options ...
stackoverflow.com - add_js « ClipBucket Documentation
Home › functions_templates › add_js. add_js. Todo : Write the documentation… © 2008 ClipBucket Documentation | Powered by Wordpress. Icons courtesy of ...
docs.clip-bucket.com