JavaScript CSS:hover:after overlay breaks jquery on click for me

I have a jQuery lightbox setup with a number of 300x300px images that on click open the lightbox. I would like to be able to overlay an semi-opaque background and text information with the video titles on the CSS :hover:after. The overlay works correctly and the lightbox works without the overlay code in place. But as soon as I combine the two the hover works but blocks the on click. Here is my HTML code:

<div class="screenShot" id="video1">
    <a target='_blank' href="#"data-videoid="21183190" videosite="vimeo">
        <img src="http://www.gorillacreativemedia.com/wp-content/themes/gorillashifter/img.php?mw=300&mh=300&src=library/images/noimage.png" />
    </a>
</div>

And here is the CSS:

.screenShot{
    display:inline-block;
    position:relative;
    margin:20px;
}
.ScreenShot img {
    max-width: 100%;
    height: auto;
}

#video1:hover:after {
    content: '\A';
    position: absolute;
    width:300px;
    height:300px;
    background:rgba(255,0,0,0.6);
    top:0;
    left:0;
    padding:100px auto;
    text-align:center;
    vertical-align:middle;
}

I don't know if I should be trying to trigger this off of a Javascript function instead or if I'm missing something simple with the formatting.

Answer:1

Use z-index:

CSS:

#video1:hover:after {
    content:'\A';
    position: absolute;
    width:300px;
    height:300px;
    background:rgba(255, 0, 0, 0.6);
    top:0;
    left:0;
    padding:100px auto;
    text-align:center;
    vertical-align:middle;
    z-index:-1 //Generally lower than the element's z-index
}

Demo: http://jsfiddle.net/GCu2D/843/

Answer:2

how could I set up individual completers per ace editor instance? I am using multiple editors in my application. - setting completers on the languageTools object seems to just add duplicates for all ...

how could I set up individual completers per ace editor instance? I am using multiple editors in my application. - setting completers on the languageTools object seems to just add duplicates for all ...

My meteor-template has five times the same elemens. So I think it should be able to make a loop of it: <table class="article" data-id="{{../article._id}}" data-section="something"> <...

My meteor-template has five times the same elemens. So I think it should be able to make a loop of it: <table class="article" data-id="{{../article._id}}" data-section="something"> <...

I have an object1 and object2. object1 has an animation with delay: 0s object2 has an animation with delay: 0.5s When you click on 1., both objects properly assign .animation,but object2 after 0.5s,...

I have an object1 and object2. object1 has an animation with delay: 0s object2 has an animation with delay: 0.5s When you click on 1., both objects properly assign .animation,but object2 after 0.5s,...

I have the following function: function messageService($http) { return { get: function (query) { return $http.get("/api/v1/messages", { params: query }); }, delete: function (...

I have the following function: function messageService($http) { return { get: function (query) { return $http.get("/api/v1/messages", { params: query }); }, delete: function (...

  1. javascript name function delete