Clear an IMG with jQuery

后端 未结 9 2011
广开言路
广开言路 2021-02-05 01:35

I\'m trying to remove the loaded image from a element, but clearing or removing the src doesn\'t do it. What to do?

HTML:

9条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-05 02:33

    If you still want the element to take up the space, but being invisible, hide it with css. Give your image a class or id and hide it like:

    
    
    $('#hide').css('visibility', 'hidden');
    

提交回复
热议问题