add_js

Definition:
function add_js() {}

Display JavaScript on the page.

Source code

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.attr('disabled', staticPage.is(':checked') ? '' : 'disabled');

			};

		check_disabled();

 		section.find('input:radio').change(check_disabled);

	});

//]]>

</script>

<?php

}

11223

No comments yet... Be the first to leave a reply!

Leave a comment