繁体   English   中英

如何将显示无属性添加到Img标签

[英]How to add Display None property to Img tag

嗨,我需要显示无添加到img标签...。

到目前为止我尝试过的...

 $('.droppedFields .droppedField').children('img').attr('style', 'display:none');

但它不起作用! 任何帮助

<div class="span5 well droppedFields ui-droppable ui-sortable">
    <div class="draggableField ui-draggable droppedField" id="CTRL-DIV-1001">
        <img src="CntrlImages/form-title-icon.gif">
        <input type="text" placeholder="Form Title" id="Header-text" class="ctrl-emailbox headerText" disabled="" style="background-color: rgb(255, 255, 255);">
    </div>
</div>

将此CSS添加到img标签

  .draggableField img {
    display:none;
    }

请尝试以下方法:

$('.droppedFields .droppedField').children('img').css("display","none");

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM