I am having trouble with getting jQuery to display CSS properties when a link is clicked on.
After testing the CSS properties, I found that setting the display to "block" in the style sheet works as expected. However, if I set the initial CSS display to "none" and attempt to use jQuery to change it to "block" upon clicking the link, nothing happens.
Despite using .css("display", "block"), I cannot figure out why it's not working. Any suggestions would be greatly appreciated!
<style type="text/css">
#contactOuter {
position: fixed;
height:100%;
width: 100%;
background: rgba(10, 10, 10, 0.5);
z-index: 1010;
display: none;
}
</style>
<html>
<a href="" id="contactLink">Contact Us</a>
</html>
<script type="text/javascript">
$("#contactLink").click(function(){
$("#contactOuter").css("display", "block");
});
</script>