• Hi, I am learning how to register and enqueue scripts. I’m doing it for a jqury gallery plugin that I got.

    I figured out that in order to register this script:
    <link rel="stylesheet" type="text/css" href="../../doptg/assets/gui/css/jquery.dop.ThumbnailGallery.css" />
    I would write it like this:
    wp_register_script('ga_ThumbnailGallery',get_stylesheet_directory_uri().'/doptg/assets/js/jquery.dop.ThumbnailGallery.js');

    But I don’t know how to register this one:

    <script type="text/JavaScript">
                $(document).ready(function(){
                    $('#galleryContainer').DOPThumbnailGallery({'ID': 1, 'SettingsDataType': 'HTML', 'ContentDataType': 'HTML'});
                });
            </script>

    Thoughts? Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter icakeov

    (@itucakov)

    I hope someone can help me out with this one, I hope to explain it better this time around.
    I got a bit of headway but got stuck at one thing.

    I’ve put this code into the head of the page (I defined the ID projects_gallery_container in styles). This is from the plugin documentation example:
    <script type=”text/JavaScript”>
    $(‘#projects_gallery_container’).DOPThumbnailGallery({‘ID’: 1, ‘SettingsDataType’: ‘HTML’, ‘ContentDataType’: ‘HTML’});
    </script>

    And the page gives a “”CSS Usage: initializing extensions”” error

    This is the page:
    http://www.grantarchitecturestudio.com/projects/residence-1/residence-1-conception/

Viewing 1 replies (of 1 total)

The topic ‘Registering and enqueueing jquery question’ is closed to new replies.