facetwp example for adding jquery to header or footer

<?php
/** example for adding jquery to wp_head or wp_footer hooks **/
add_action( 'wp_head', function() { // or 'wp_footer'
	?>
	<script>
	(function($) {
		// add jquery here
	})(jQuery);  
	</script>
	<?php
}, 100);