Been trying to get a javascript gallery to run in wordpress, but I’m not too sure what to put into the .ready(function) in order to run the gallery. The original page to the jQuery function is here: http://manos.malihu.gr/simple-jquery-fullscreen-image-gallery/2
I assume that I need to run some function that will run the entire javascript file, but I’m not quite sure what that function might be. Sorry for being so new to this, but thanks so much for any help!
function malihu_gallery() {
if (!is_admin()) {
// Enqueue Malihu Gallery JavaScript
wp_register_script('malihu-jquery-image-gallery', get_template_directory_uri(). '/js/malihu-jquery-image-gallery.js', array('jquery'), 1.0, true );
wp_enqueue_script('malihu-jquery-image-gallery');
// Enqueue Malihu Gallery Stylesheet
wp_register_style( 'malihu-style', get_template_directory_uri() . '/CSS/malihu_gallery.css', 'all' );
wp_enqueue_style('malihu-style' );
function gallery_settings () { ?>
<script type="text/javascript">
jQuery(document).ready(function() {
// What do I put in here?
});
</script><?php
}
}
}
add_action('init', 'malihu_gallery');
I would guess, based on the limited view of the actual code, that this set of variables should be set/modified in that space:
Of course, this assumes these variables aren’t already set in your ‘/js/malihu-jquery-image-gallery.js’ file.