Monitor newly loaded tags

0

My scenario is as follows, I have a menu (class="menu") where any link that is clicked on it is opened in a div (div id="content")

the problem is that the links that open inside the content div even using the menu class in the links they do not open inside the own div? Any idea what that might be?

 $('.menu').on('click', function () {
 $('#conteudo').load(this.href);
 return false;
 });

  --> esses links carrega dentro da div conteudo OK
  <a class="menu" href="pg1.php"></a>
  <a class="menu" href="pg2.php"></a>
  <a class="menu" href="pg3.php"></a>

  <div id="conteudo" > 
  --> esse link nao carrega a pagina 4 dentro da propria div
  <a class="menu" href="pg4.php"></a>
  </div>

I may be wrong more I believe that jquery does not see the newly loaded class inside the div so it does not open inside itself. any solution to this?

    
asked by anonymous 23.03.2018 / 15:18

0 answers