October 17, 201312 yr http://freedomcore.com/saverplaces.co.uk/NEW/ In the above site when click the Terms & Conditions or More information on this voucher links just below the Get Voucher button. You will see a div slide down below with the content. I want it so that if you have clicked Terms & Conditions then go and click More information on this voucher it will hide the "Terms & Conditions" content so that both are not displayed at the same time. My JavaScript isn't the best this is what I came up with but it does not work: I have More information on this voucher link this class hide-terms-1 then I have this jQuery code: $(document).ready(function(){ $(".hide-terms-1").click(function(){ $("#voucher-terms-1").hide(); }); }); This seems to be working kind of but once it is click you can not open it back up again.
October 17, 201312 yr I don't have your original code, so fill in the blanks where necessary: $(document).ready(function(){ $("more-information-click").click(function(){ $("terms-and-conditions-div").hide(); $("more-information-div").slideToggle(300); }); }); The T&C div will stay hidden while clicking the More Information toggle even if already hidden; it will display when you click the T&C toggle (as already live on your website).
Create an account or sign in to comment