This is realated to a much more complex earlier post, where I was trying to tie together js event handlers. I realized after reviewing my earler post that I am not sure how one of the behaviors on my site works so I wanted to post it as a new topic.
Basically, I am working with a commercial wordpress plugin that uses a lot of very complex JS/AJAX code to update some dropdown menus depending on what selection a user makes. For example, if you select ‘option 1’ in drop down menu #1, drop down menu #2 is updated with ‘a,b & c’ and if you were to select ‘option 2’ in drop down menu #1, drop down menu #2 would display ‘x,y & z’.
The problem is that I have no idea how the plugin detects changes in drop down menu #1 in order to update the options in drop down #2. Normally, there is some sort of onClick event that handles these kinds of events but after scouring the code, I can’t find anything.
Rather than post the complete code here, I think it might be easier to point you to the actual site, so that you can look for yourself. I would really appreciate it if someone could tell me how drop down menu changes are being detected and what function is handling the update.
I think the code you want is minified which makes it very difficult to read but this bit
f(k).changeorf(i).changein the ‘ProductOptionsMenus’ function is probably the bit thats doing the work (f is jqnc() which I suspect is the jQueryNonConflict fubnction) what k and i are partly depends what variables are passed as l,g,o and pWith regards to your comments I tried this script:
Sorry I only got as far as running this script:
But alas I’m having the same issue you are that it’s not triggering the switch that activates the price lookup. I am getting a ‘too much recursion’ error but that seems to fire without the code above running. I don’t know if that is your added code or the original source.
Wish you the best in solving this. If I have any thoughts I’ll post.