Title: [Plugin: AdRotate] jQuery problem (lightbox component)
Last modified: August 20, 2016

---

# [Plugin: AdRotate] jQuery problem (lightbox component)

 *  Resolved [ChowKaiDeng](https://wordpress.org/support/users/chowkaideng/)
 * (@chowkaideng)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-adrotate-jquery-problem-lightbox-component/)
 * I’m not completely sure, but I think that AdRotate is breaking something in my
   jQuery library calls. This happens after WordPress upgraded to 3.3.1
 * This is the problem: among my plugins, I have installed Rich Widget, which is
   a simple plugin that adds a FCKEditor like box to widgets, so you can edit the
   content of them in RTF.
 * When AdRotate is activated, I can’t see no more the lightbox on the RTF editor
   of Rich Widget, and when deactivated, it shows ok.
 * I thought it was something with the jQuery library version called by the updated
   WordPress, so I de-registered the jquery script and registered a specific version
   of jquery (older) on my functions file, but nothings happens.
 * Is someone around here having a similar problem, maybe with other plugins that
   use similar lightbox scripts?
 * Greetings!
 * [http://wordpress.org/extend/plugins/adrotate/](http://wordpress.org/extend/plugins/adrotate/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Arnan de Gans](https://wordpress.org/support/users/shrikee/)
 * (@shrikee)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-adrotate-jquery-problem-lightbox-component/#post-2491695)
 * AdRotate doesnt use or load jquery.
 *  Thread Starter [ChowKaiDeng](https://wordpress.org/support/users/chowkaideng/)
 * (@chowkaideng)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-adrotate-jquery-problem-lightbox-component/#post-2491696)
 * So, what’s this?
 * File: adrotate-functions.php (line 848)
 *     ```
       function adrotate_filemanager_admin_scripts() {
       	wp_enqueue_script('media-upload');
       	wp_enqueue_script('thickbox');
       	wp_enqueue_script('jquery');
       }
       ```
   
 * (line 862)
 *     ```
       function adrotate_filemanager_admin_styles() {
       	wp_enqueue_style('thickbox');
       }
       ```
   
 * File: adrotate.php (line 675)
 *     ```
       <script language="JavaScript">
       			jQuery(document).ready(function() {
       				jQuery('#adrotate_image_button').click(function() {
       					formfield = jQuery('#adrotate_image').attr('name');
       					tb_show('', 'media-upload.php?type=image&TB_iframe=true');
       					return false;
       				});
   
       				window.send_to_editor = function(html) {
       					imgurl = jQuery('img',html).attr('src');
       					jQuery('#adrotate_image').val(imgurl);
       					tb_remove();
       				}
   
       			});
       			</script>
       ```
   
 * That was just a quick search among obvious files, but I haven’t check them all
   properly.
 * As I see, the AdRotate thickbox could be interfering with the Rich Widget thickbox.
   They both use jQuery.
 *  [Arnan de Gans](https://wordpress.org/support/users/shrikee/)
 * (@shrikee)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-adrotate-jquery-problem-lightbox-component/#post-2491697)
 * Oh duh.. forgot about those.
    However, those are WP api’s/functions used by many
   plugins.
 *  Thread Starter [ChowKaiDeng](https://wordpress.org/support/users/chowkaideng/)
 * (@chowkaideng)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-adrotate-jquery-problem-lightbox-component/#post-2491698)
 * Yes indeed. After a few minutes I’ve figured out. The problem was caused by Rich
   Widget, not AdRotate.
    Rich Widget was doing this ugly thing:
 *     ```
       echo '<link href="' . RB_RICHWIDGET_BASEURL . '/thickbox/thickbox.css" rel="stylesheet" type="text/css" />';
   
       wp_enqueue_script('thickbox_custom', RB_RICHWIDGET_BASEURL . '/thickbox/thickbox.js');
       ```
   
 * Instead of just simply this:
 *     ```
       wp_enqueue_script('thickbox');
       ```
   
 * I guess that Rich Widget was written in a time when thickbox was not part of 
   the core scripts of WP, or something like that.
 * I’ve changed the thing and everything it’s ok. I’m gonna post all this stuff 
   on the Rich Widget forum.
 * Greetings

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: AdRotate] jQuery problem (lightbox component)’ is closed to 
new replies.

 * ![](https://ps.w.org/adrotate/assets/icon-256x256.gif?rev=3117289)
 * [AdRotate Banner Manager](https://wordpress.org/plugins/adrotate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/adrotate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/adrotate/)
 * [Active Topics](https://wordpress.org/support/plugin/adrotate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/adrotate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/adrotate/reviews/)

## Tags

 * [editor](https://wordpress.org/support/topic-tag/editor/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * 4 replies
 * 2 participants
 * Last reply from: [ChowKaiDeng](https://wordpress.org/support/users/chowkaideng/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-adrotate-jquery-problem-lightbox-component/#post-2491698)
 * Status: resolved