Tips and Tricks HQ Support Portal › Forums › WP Lightbox Ultimate › Lightbox Ultimate F.A.Q/Instructions › Lightbox Ultimate – Clicking on the Anchor does not Display any Overlay
Tagged: javascript, lightbox, lightbox ultimate not working
- This topic has 0 replies, 1 voice, and was last updated 13 years, 3 months ago by amin007.
-
AuthorPosts
-
July 27, 2011 at 12:51 am #3905amin007Participant
If clicking on the anchor text or image directs you to that Image or Video (but no overlay display) then this post might be helpful for you.
Possible reasons – 1) multiple “jquery.js” files included on that page/post leading to a JavaScript conflict.
Please have a look at the following post which will explain this issue:
Wrong Way of adding JQuery library to WordPress – Source of Javascript Conflicts
How to identify the source of the issue
Simply right click on your mouse and select “View page Source” option. Now you will be able to see all the scripts included on that page/post by your currently active theme and all other plugins.
If your theme and plugins are using the proper WordPress defined function (wp_enqueue_script ) to include “jquery.js” file you will see a line like the following –
<script type='text/javascript' src='http://www.example.com/wp-includes/js/jquery/jquery.js?ver=1.10.2'></script>
If you see any other “jquery.js” file on that page/post then that means your theme or some other plugins have included that in the wrong way and now there are multiple “jquery.js” files in the page/post – which is causing the JavaScript conflict. For example –
<script type='text/javascript' src='http://www.example.com/wp-content/plugins/your-plugin/js/jquery.js'></script> (wrong way of adding jquery.js)
<script type='text/javascript' src='http://www.example.com/wp-content/plugins/test-plugin/js/jquery.min.js'></script> (wrong way of adding jquery.js)As you can see there is a “test-plugin” running on your site. There is a “jquery.js” or “jquery.min.js” file in the “js” directory of that plugin and It’s including that .js file in the wrong way.
Solution:Deactivate the plugin or the theme in question. Now there will be only one “jquery.js” file on that page. Lightbox should be working fine now.
Some plugins or themes can directly include the JQuery from Google. For example –
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js'></script>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'></script>In that case It’s hard to identify which plugin is including it or if it is actually the theme. The only way to solve this problem is to keep deactivating the theme and plugins (one at a time) and check if the jquery.js file is still being included.
Once, you identify the plugin or theme just keep it deactivated for now. Lightbox should be working fine as there is no JavaScript conflict.
If you really want to use that conflicting theme or plugin please contact your developer and ask them to follow WordPress’s coding guideline and fix the coding issue.
-
AuthorPosts
- The topic ‘Lightbox Ultimate – Clicking on the Anchor does not Display any Overlay’ is closed to new replies.