Skip Navigation

[Résolu] triggering radio with jquery goes wrong

Ce fil est résolu. Voici une description du problème et la solution proposée.


Setup custom JS codes to setup image radio field.


It is a custom JS codes problem, see details here:

Relevant Documentation:

0% of people find this useful.

This support ticket is created Il y a 3 années et 11 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Marqué : ,

This topic contains 7 réponses, has 2 voix.

Last updated by Ido Angel Il y a 3 années et 11 mois.

Assisted by: Luo Yang.


I have a set of images which trigger, respectfully, a set of hidden radio buttons in a search. The code goes like this:

jQuery(".radio-trigger").click(function() {
  var triggerIndex = jQuery(this).index();
  var targetIndex = jQuery(".form-check").eq(triggerIndex);

the correct radio is being triggered, but once the view results are updated, somehow the first radio button is being automatically triggered again, which messes up the results. Where am I wrong?

You can see this happening here: hidden link




I assume we are talking about these hidden radio inputs:
- תמורתיות
- פרסונליות

I have tried it in the URL you mentioned above:
Click one of images, for example: גלוקליות

It works fine, I see the radio input "פרסונליות" is checked, see screenshot radios.JPG

Is there any missing? please provide detail steps to duplicate the same problem, thanks


try going to the link again but don't change any filter values other than pressing the images (so that you can see all radio button appearing - there are 6). then play around and see that if you press, for example, the fourth image - what happens.
thx Luo!


Since it is a custom JS codes problem, please provide your website credentials in below private message box, I need to test and debug it in a live website, thanks


Thanks for the details, I have done below modifications in your website:
Edit JS Code "Search":
hidden link

replace line 7 from:

jQuery(".radio-trigger").click(function() {


jQuery(".radio-trigger").click(function(e) {

So click the images won't be able to trigger Views AJAX search, but change the radio input values will trigger Views AJAX search, it is only an example for your reference.

More help:
hidden link


thx - but issue persists. try clicking on the 3rd icon two times, for example


I have checked again in your website:
1) Deactivate custom JS Code "Search":
hidden link

2) Edit the post view "tracks1"
hidden link
in section "Search and Pagination", click "JS Editor", change the JS codes, add a line:


3) Test it in front-end:
hidden link
Click the 3rd image, and check it in my Chrome browser, I see two results:


It should output only one result: 3, it conducts the problem.

Then I have checked the source HTML codes of above problem URL:
view-source:hidden link

There are 12 HTML elements are using CSS class name "radio-trigger", as I understand from your JS codes, there should be only 6 HTML elements using this CSS class name, I suggest you remove the CSS class name from other those unused HTML elements.


My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.