I have 10 anchors, and i give the id #first-project
to the first anchor and when its clicked i want that the html element with an id #prev-project
be hide. With my code it works but the id #prev-project
stays hided all the time, only if i click on for the first time on the second anchor it's ok. How can I rewrite this code?
<script type="text/javascript">
$("#first-project").click(function () {
$("#prev-project").css("display", "none");
});
</script>