My jQuery code changes the height of my div from 200px to 100% on click. This works perfect. But I need to be that when I click it AGAIN, the same element, the div changes back to 200px. I have no idea how to do this except by an if statement but i’m not sure how I would see if a css property matches a certain css property.
Here is my code.
<script>
$(document).ready(function() {
$("#port1").click(function() {
$(".ppc").css("height","100%");
});
});
</script>
1 Answer