Hi everyone...
I'm hoping to get some assistance.
I'm creating multiple search functions... lets call them as per below
Search: 1, 2, 3 and 4
All the searches are to appear in the same area just different design.
Currently my javascript is not setup correctly and the way I want it. When I click on 1, all is good. However when I click 2, it won't appear as search 1 is appearing.
My objective is to ensure that only the search function clicked on will appear, and the rest will remain hidden. IE: If 1 is clicked... appear. If 2 is then clicked, 1 should disappear and 2 appear.
This is my html code
Code:
<div id="buyrevealed" style="display: none;">
more code for search funcion
</div>
java
Code:
function togglebuy( )
{
var div = document.getElementById("buyrevealed");
div.style.display = ( div.style.display == "block" ) ? "none" : "block";
}
</script>
I have the same javascript for all 4 searches to appear.
Would love some assistance. Hope this makes sense.
Thank you.