I'm trying to make a function to load a content with .load()
of jQuery
, .load()
receives a parameter param
that would be the address of the file.
And I would like this html
to be loaded after a specific element, in the aside
case.
I tried using the .after()
method but I could not, I wonder if anyone has a solution?!
And I have another question, after loading this new content, if the methods that are within $(document).ready();
will still work, to interact with the new loaded elements?!
HTML line where onclick event is
<li class="list-group-item pointer" onclick="getTemplate('admin/email/lista-emails.php')">
Lista de E-mails
<span class="indicador success white right">14</span>
</li>
Javascript Code
function getTemplate(string){
$("#here").after().load(string);
}
Note: He uploaded the content inside aside