$('div#showme').css('display', 'none');
$('#edit').click(function() {
event.preventDefault();
console.log("detected click")
$('div#showme').toggle();
});;
I have two #showme forms, and two #edit buttons, I want to show just one form at a time using Jquery, as it is currently coded, this will show both forms #showme, when one #edit is clicked. How can I fix this
IDs are unique, use
classinstead and select it with$("div.showme")and$(".edit")If you want to select only one form and show it, do as I do in this Demo Fiddle