Update div with click

0

I'm using this code to refresh a page div by clicking the

<div id="campo"></div>

function atualiza_campo_usuario(){
    $("#campo").load("http://site.com");
}

But what happens is that sometimes updates and sometimes does not update, only updates by clicking 2 times, and this ends up messing up, I need every time that there is a clik , update the content of div .

Note: I make it clear that the button that updates the content of div , stays in a modal that is redeemed through iframe .

    
asked by anonymous 07.04.2015 / 09:04

0 answers