简体   繁体   中英

Using Wordpress theme, can't find click event in JavaScript

I'm using a Wordpress theme for a photography website and some of the javascript in the theme is disabling links that I'm trying to create.

http://www.joesingh.samcampsall.co.uk/login/

Originally the image on this page would pop up in lightbox (which I presume is why the link is disabled), but I've made a template that allows the image to link to another page. The link within the tags is correct, but when clicked nothing happens.

Using Chrome I can see that there's a 'click' event listener on the classes for the containing div ('one_third', 'gallery3') and this is in http://www.joesingh.samcampsall.co.uk/wp-includes/js/jquery/jquery.js?ver=1.8.3

Unfortunately I'm a total novice, and a lot of searching and reading around hasn't allowed me to identify what changes I need to make. Any pointers would be really appreciated.

If you have access to the code and you are a novice you could unbind the click event by doing something like the code below. This will make your link behave in the normal way. Just put the following after your other js files.

jQuery('.one_third').unbind('click');

You may need to play around with the class to make sure you get the right one.

Good luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM