Need to show a certain piece of jQuery in the header of a wordpress site for settings of a plugin. Is it bad practice to use this the php print method to accomplish it? I'm using the following code:
<?php is_page( 'front-page' ); print
"<script>
jQuery(function() {
jQuery('#bannerscollection_kenburns_majestic').bannerscollection_kenburns({
skin: 'majestic',
width: 2530,
height: 1200,
autoHideNavArrows:true,
numberOfThumbsPerScreen:16,
thumbsOnMarginTop:23,
thumbsWrapperMarginTop: 0,
initialZoom: 1,
finalZoom: 1,
});
});
</script>"
?>
EDIT
I ended up using this, which works great.
<?php is_page( 'front-page' ); wp_enqueue_script( 'kbsettings' ); ?>