jquery html callback

前端 未结 4 1707
渐次进展
渐次进展 2020-12-06 17:08

Is there a callback for the html() function or a way to check that it is finished. For example:

$(\"#some_div\").html(\'something here\');

if($(\"#some_div\         


        
4条回答
  •  萌比男神i
    2020-12-06 17:20

    The only way i found with live and callback,

    $('p').live('click', function() {
        // delay dont work with html() // fcallback function
        $(this).parent('div').slideUp('slow', function() {
          // empty block
          $(this).html('');
           if($(this).html()==''){
             // function
             myFunction();
           }
        });
    });
    

提交回复
热议问题