Hi,
Trying to to create some conditional logic on some global options fields, but am having some difficulty.
Its essentially a SHOW / HIDE conditional logic that only shows a text field if the customer selects yes.
I've removed the product ID from the DOM product options TPL so that the same code can be used globally on the website
So basically when the page loads, #opt_76 is set to hide
When "option_3599" is set to "17022", then #opt_76 is set to show
When "option_3599" is set to "17021", then #opt_76 is set to hide again
// HIDE ENGRAVING TEXT MEDALS - ID $('#opt_76').hide(); // INITIAL SET TO HIDE$.ceEvent(‘on’, ‘ce.ajaxdone’, function(data) {
// alert(‘Ajax done’);$(function() { $('#option_3599').change( function(){ if($('#option_3599').val() == '17022') { $('#opt_76').show(); // SET TO YES SHOW }; }); $('#option_3599').change( function(){ if($('#option_3599').val() == '17021') { $('#opt_76').hide(); // SET TO NO HIDE } });
});
});
Its seems a global show is kicking in from the Ajax call,
Any ideas on how to get this to work?
Or are there any better solutions to get this to work?
Thanks
Stephen