JavaScript jQuery show() not working as expected jquery show not working,jquery show not working after hide,

I'm not sure why this .show() method not working within the .click() function? The alert is displayed correctly, but the page overlay is not.

html

<!-- page overlay for login -->
<span id="page-overlay"></span> 

<a target='_blank' href="#" id="clicker">settings</a>

js

$(document).ready(function() {
  $("#clicker").click(function () {
    alert("Hello!");
    $("#page-overlay").show();
  });
});

css

#page-overlay {
    display: none;
    position: fixed;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    background-color: #E0E0DF;
    opacity: 0.65; 
    z-index: 100;
}

Here is a fiddle

Answer:1

As part of a test scenario, I would like to use some large JSON objects. I would like to store these in a separate directory, and then import each object as I need them. Currently I am using the ...

As part of a test scenario, I would like to use some large JSON objects. I would like to store these in a separate directory, and then import each object as I need them. Currently I am using the ...

  1. node in json
  2. node json from file
  3. node json from string
  4. node json from buffer
  5. node json from object
  6. node js use json file
  7. node js use json

Is it possible to declare an anonymous generator function using the arrow syntax in ES6 JavaScript? This is what I've tried: let func = *() => { }; but this doesn't parse (I'm using Babel.js to ...

Is it possible to declare an anonymous generator function using the arrow syntax in ES6 JavaScript? This is what I've tried: let func = *() => { }; but this doesn't parse (I'm using Babel.js to ...

Title - Sorry about the title, it was difficult for me to actually explain this. So I recently finished working on a dynamic fields system using jQuery. This is all working great however I'm wanting ...

Title - Sorry about the title, it was difficult for me to actually explain this. So I recently finished working on a dynamic fields system using jQuery. This is all working great however I'm wanting ...

I was wondering if there was a feature or a way to select on line at a time from jquery/javascript. The issues is that it must be the element inside a <pre></pre> tags. The code look like ...

I was wondering if there was a feature or a way to select on line at a time from jquery/javascript. The issues is that it must be the element inside a <pre></pre> tags. The code look like ...