WP-SimpleViewer » How-to and Troubleshooting

wp-simpleviewer jQuery problem

(3 posts)

  1. I have a small problem.
    When I active the wp-simpleviewer plugin for Wordpress, it ads the following code to my page:

    <script type='text/javascript' src='http://localhost/norwegianfashion/wp-includes/js/jquery/jquery.js?ver=1.2.6'></script>
    <script type='text/javascript' src='http://localhost/norwegianfashion/wp-includes/js/thickbox/thickbox.js?ver=3.1-20080430'></script>

    The problem is that I'm already using jQuery and have added the jquery.js further up in the document.

    The result, after being loaded twice, is that jQuery stops working and breaks the design of my page.

    I've been looking through the following files
    wp-simpleviewer.php
    wp-simpleviewer-admin.php
    wp-simpleviewer-mediatab.php

    to see if I could comment out the line adding the javascript. But I can't find it.

    suggestions anyone?

    Posted 1 year ago #
  2. my current workaround is removing the line where I add the jquery.js script.

    The problem is that if I upgrade the wordtube plugin, it too will add the jquery.js and I will have the same problem again.

    Posted 1 year ago #
  3. The function wp_simpleviewer_print_admin_scripts() registers scripts that are based on jquery and loads them, function wp_simpleviewer_print_scripts() is used in the frontend.

    Looks like the other plugin does not load jquery with wp_enqueue_script('jquery'); what is the official way to do it.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.