F
F
Forge01002015-10-04 14:58:22
JavaScript
Forge0100, 2015-10-04 14:58:22

Why don't generated HTML blocks in JS want to trigger popup show events?

ec5bd1197d6b42d990639b59df19d0a5.png

The blocks in the blue frames have Popup events, since they are written in the html document itself, and the blocks in the red frames were loaded using an AJAX request. Why don't these blocks have this event?

If I use the JQuery script leanModal , the block window appears when you click on the link with the parameter, and here is the hidden block
<a href="#hidden_block" rel="leanModal">

<div id="hidden_block" class="lean_overlay">
   <p>Я скрытый блок, который не хочет показываться :)</p>
</div>


Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Inchin ☢, 2015-10-04
@Forge0100

Added elements not responding to mouseenter?
Hang event handlers on ancestors.

<ul>
  <li></li>
<ul>

$("ul").on("click", "li", function(){ ... });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question