WordPress.org

Forums

Slideshow
[resolved] Conflict occur with slideshow (16 posts)

  1. Spyroweb
    Member
    Posted 2 years ago #

    i am using slideshow i love this plugin but now i am facing with conflict. my slideshow is ok but i have add a jQuery to my menu for some animation before activation of slideshow its ok but when i active menu effected. please help me to remove this conflict, but please keep in mind i want to use both of them.
    the error i got.

    "TypeError: $(...).lavaLamp is not a function"

    more over lavalamp is a function in my jQuery using for menu and i use this in my java script also.
    but the error came due to jQuery. i have kept both In one file.
    thanks in advance for your help.

    http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/

  2. Stefan Boonstra
    Member
    Plugin Author

    Posted 2 years ago #

    The slideshow doesn't use any kind of 'lavaLamp' function, this function is probably used by the jQuery menu. It could be that the menu loads a script that's not compatible with WordPress' current jQuery version.

    Could I perhaps see your website to see what's causing the conflict?

  3. Spyroweb
    Member
    Posted 1 year ago #

    Thank you very much for your reply and i am really sorry for late reply.

    "TypeError: $(...).lavaLamp is not a function"

    lavaLamp is a function in my menu script. and i have a template for my home page i don't know what is the reason but when i remove the shortcode of slideshow my menu animation work and on my reaming templates the menu also working. so i think this the issue of shortcode.
    the shortcode i am using for my slideshow is
    " <?php do_action('slideshow_deploy', '51'); ?>"
    i have include three shortcodes.
    please help me if you have different shortcodes for slideshow.

  4. Spyroweb
    Member
    Posted 1 year ago #

    mean due to this shortcode my other script(using for menu) has disturbed.

  5. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    I suspect the jQuery library used for the menu script is included with a '<script>' element. This would give WordPress the impression that the jQuery library hasnt been loaded yet and load it itself for the slideshow.

    As the slideshow is loaded later than the menu, this would cause the 'lavaLamp()' function to disappear from jQuery's memory.

    If this is the case, the jQuery script for the menu script should be included like this:

    <?php wp_enqueue_script('jquery'); ?>

  6. Spyroweb
    Member
    Posted 1 year ago #

    Dear this still not work for me it give me the following error.

    "NetworkError: 404 Not Found - http://localhost/js/menu.js"

    mean it not include my script.

    Am i missing in including method or any thing else.

    the way i include my script is
    <script type="text/javascript" src="<?php wp_enqueue_script('jquery'); ?>/js/menu.js"></script>

    please help me how to include this function
    thanks

  7. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    That's almost correct, the 'wp_enqueue_script()' function already outputs the '<script>' tags though. It should work if you do it like this:

    <?php wp_enqueue_script('jquery'); ?>
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/menu.js"></script>

    The bloginfo function: '<?php bloginfo('template_directory'); ?>' will output the URL to your theme's directory.

  8. Spyroweb
    Member
    Posted 1 year ago #

    Dear sir I use the above code you given but i am using a child theme and its goes now to my parent theme directory. i know this code is ok but sir kindly can you tell me how to handle
    '<?php bloginfo('template_directory'); ?>' this url for my child theme.

    using the child theme of Twenty Eleven.

    Thanks for your help.
    You are so sweet like your plugin!

  9. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    If you're using a child theme you should probably use the bloginfo function like this: '<?php bloginfo('stylesheet_directory'); ?>'.

  10. Spyroweb
    Member
    Posted 1 year ago #

    still an error now the error is

    ReferenceError: jQuery is not defined
    [Break On This Error]

    })(jQuery);

    please you can see my error here

    http://localhost/ish/

  11. Spyroweb
    Member
    Posted 1 year ago #

    i wonder about it that why its not working i think this only my bad luck..........

  12. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    I'm sorry, I should have put the menu script in a function as well in the example. This is what it should have looked like:

    <?php wp_enqueue_script('menu-script', bloginfo('stylesheet_directory') . '/js/menu.js', array('jquery')); ?>

    Using this code, you won't need to enqueue jQuery. WordPress will handle it for you. This code needs to be placed before the '<?php wp_head(); ?>' function call in your theme's 'header.php'.

  13. Spyroweb
    Member
    Posted 1 year ago #

    thanks a lot for your help you are great!!!!!!!!!!!

    I am facing one more problem

    http://localhost/ISH/wp-content/themes/ISH in my header section i dont have any idea about this please if you have any idea help me
    Thanks in billion!!!!!!!!!!!
    you can see it here on top of my logo

    http://localhost/ish/

  14. Spyroweb
    Member
    Posted 1 year ago #

    i have include the code you have given before my <?Php wp_head();?>
    and i have include after this this peace of code

    `<?php wp_enqueue_script('jquery'); ?>
    <script type="text/javascript" src="<?php bloginfo('template_stylesheet'); ?>/js/menu.js"></script>

  15. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    I'm sorry, I can't access your localhost environment.

  16. Spyroweb
    Member
    Posted 1 year ago #

    dear in header section i found on front end

    http://localhost/ISH/wp-content/themes/ISH

    mean this my theme root.

    ok i will try myself if i cant then when i upload to my server i will give u my url

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic