Title: Conflict with plugin using coordinates
Last modified: August 31, 2016

---

# Conflict with plugin using coordinates

 *  Resolved [jbd7](https://wordpress.org/support/users/jbd7/)
 * (@jbd7)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/conflict-with-plugin-using-coordinates/)
 * Hi,
 * I have installed WPR on my theme, and was already using the Flickr-Foto-Info 
   plugin, which displays an icon over Flickr photos linked in a post.
 * That plugin works fine when WPR is not displayed. However, when WPR is on the
   top of my website (in “mobile mode”, for narrow viewports), the coordinates are
   wrongly calculated.
 * I figured out that the JS code of that plugin calls `show_toolbar` with wrong
   parameters (basically, the toolbar is shown too low, with an offset equal to 
   the height of WPR)
 *     ```
       $j(document).ready(function () {
           toolbar_div = $j("<div class='flickr-toolbar'></div>");
           $j('body').append(toolbar_div);
           flickr_images = $j("img[src *='flickr']");
           $j(flickr_images).each(function () {
               $j(this).hover(function () {
                   img_html = $j('<div>').append($j(this).clone()).remove().html()
                   matches = re.exec(img_html);
                   if (matches) {
                       show_toolbar(matches[1], $j(this).offset());
                   }
               }, function () {
                   $j('.flickr-toolbar').hide();
               })
           })
       })
       ```
   
 * Would you know how to make the `offset` function take the WPR static menu in 
   consideration?
 * Thanks
 * [https://wordpress.org/plugins/wp-responsive-menu/](https://wordpress.org/plugins/wp-responsive-menu/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [jbd7](https://wordpress.org/support/users/jbd7/)
 * (@jbd7)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/conflict-with-plugin-using-coordinates/#post-7177846)
 * For those interested, this is what I added in the JS of the plugin to make it
   consider the height of the WPR static menu:
 *     ```
       if (document.getElementById('wprmenu_bar').offsetHeight == null) {
           adjustment = 0;
         }
       else {
           adjustment = document.getElementById('wprmenu_bar').offsetHeight;
       }
   
       toolbar_top = parseInt(image_offset.top) + 10 - adjustment; ...
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Conflict with plugin using coordinates’ is closed to new replies.

 * ![](https://ps.w.org/wp-responsive-menu/assets/icon-256x256.png?rev=2246917)
 * [WP Responsive Menu](https://wordpress.org/plugins/wp-responsive-menu/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-responsive-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-responsive-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-responsive-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-responsive-menu/reviews/)

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [jbd7](https://wordpress.org/support/users/jbd7/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/conflict-with-plugin-using-coordinates/#post-7177846)
 * Status: resolved