0

http://codepen.io/anon/pen/dXkoYp

Hello I am trying to trigger this popup after the line, I need this line to stop the page from anchoring

         e.preventDefault();

I have tried to trigger it using this below but nothing shows up

        $('div#popup1').trigger('click');

The expected result is this http://codepen.io/anon/pen/AXbvXZ

mweis
  • 27
  • 1
  • 7

2 Answers2

0

it helps maybe: Stackoverflow question from '11

Community
  • 1
  • 1
  • If you're just going to link to another question, flag it as a duplicate. Link-only answers are discouraged. – Barmar Jul 11 '16 at 22:01
0

Remove onclick event attribute at div#popup1 element, e.preventDefault(), add click event at div#popup, set .overlay .css() opacity to 1 at div#popup1 click event handler. Not certain how to update codepen

$("#stopRed").on("click",function(e){
    $("div#popup1").trigger('click');
});

$("div#popup1").click(function() {
  $(".overlay").css("opacity", 1)
});
guest271314
  • 1
  • 15
  • 104
  • 177