0
I want to know how to make one $('#div-search').on('load', ()=>{alert('carregou');});
I have a div
where there are several $('#div-search').load(url)
in the code.
however now I need to perform a series of validations after loading it.
I have tried the following tests:
$('#div-search').on('load', ()=>{alert('carregou');});
$('#div-search').on('ready', ()=>{alert('carregou');});
$('#div-search').ready( ()=>{alert('carregou');});
and none of them had any effect.
P:"but pq tu não faz $('#div-search'). load(url,()=>{Alert('loaded');})´?"
R:
1. 'Cause I don’t want to have to search every call in code;
2. Why is it not always fixed $('#div-search'), is often a variable $(seletorId) and in addition to being harder to find, I would have to do an IF;
Detail better what you need, the way the question was formulated do not understand what you need.
– Jorge.M
I want to know how to make one
()=>{alert('carregou');}
after you finish loading$().load('google.com');
– HagaHood