It's hard to tell this as a question in one small headline.
Basically, I have a div:
<div class="sites" id="site1"></div>
which can be clicked by the user, and when this div is clicked, I want another div to appear with a similar identifier:
<div id="site1_desc" class="description_holder">
Is there a way that when the previous div is clicked can be selected last for use. I have the same div combination for site2, 3, 4, etc. I thought something like:
$(document).ready(function(){
$('.sites).click(function(){
$(this&'_desc').css({visibility: "visible"});
});
});
I understand that the above does not work, but I am not sure what the best way to do this. Hopefully now the question is clearer.
source
share