需要找到“关闭”在jquery中的多个div内的类。 [英] Need to find "close" class inside the multiple div's in jquery.

查看:76
本文介绍了需要找到“关闭”在jquery中的多个div内的类。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<< pre lang =HTML> div class =modalaria-hidden =falsetabindex = - 1>< div class =modal-dialog> < div class =modal-content> < div class =modal-header> < button type =buttonclass =closedata-dismiss =modalaria-label =Close>< span aria-hidden =true>×< / span>< /按钮> < h4 class =modal-title>帮助< / h4> < / DIV> < div class =modal-bodystyle =max-height:300px; overflow:scroll;>< div class =help-list-item>< / div>< label style = width:180px; margin-right:10px;>< kbd> ENTER< / kbd>< / label>< span>插入段落< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + Z< / kbd>< / label>< span>撤消最后一个命令< ; / span>< div class =help-list-item>< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + Y< / kbd>< / label>< span>重做最后一个命令< / span>< div class =help-list-item>< / div>< label style =width:180px; margin -right:10px;>< kbd> TAB< / kbd>< / label>< span> Tab< / span>< div class =help-list-item>< / div> < label style =width:180px; margin-right:10px;>< kbd> SHIFT + TAB< / kbd>< / label>< span> Untab< / span>< div cla ss =help-list-item>< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + B< / kbd>< / label>< span>设置粗体样式< / span>< div class =help-list-item> ;< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + I< / kbd>< / label>< span>设置斜体样式< / span>< div class =help-list-item> ;< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + U< / kbd>< / label>< span>设置下划线样式< / span>< div class =help-list-item> ;< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + SHIFT + S< / kbd>< / label>< span>设置删除线样式< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + BACKSLASH< / kbd>< / label>< span>清理样式< / span>< div class =help-list-item> < / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + SHIFT + L< / kbd>< / label>< span>设置左对齐< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + SHIFT + E< / kbd>< / label>< span>设置中心对齐< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + SHIFT + R< / kbd>< / label>< span>设置右对齐< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + SHIFT + J< / kbd>< / label>< span>设置完全对齐< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + SHIFT + NUM7< / kbd>< / label>< span>切换无序列表< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + SHIFT + NUM8< / kbd>< / label>< span>切换有序列表< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + LEFTBRACKET< / kbd>< / label>< span> Outdent on current paragraph< / span>< div class =help-list-item> ;< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + RIGHTBRACKET< / kbd>< / label>< span>缩进当前段落< / span>< div class =help-list-item> ;< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + NUM0< / kbd>< / label>< span>将当前块的格式更改为段落(P标记)< / span>< div class = help-list-item>< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + NUM1< / kbd>< / label>< span>将当前块的格式更改为H1< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + NUM2< / kbd>< / label>< span>将当前块的格式更改为H2< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + NUM3< / kbd>< / label>< span>将当前块的格式更改为H3< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + NUM4< / kbd>< / label>< span>将当前块的格式更改为H4< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + NUM5< / kbd>< / label>< span>将当前块的格式更改为H5< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + NUM6< / kbd>< / label>< span>将当前块的格式更改为H6< / span>< div class =help-list-item >< / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + ENTER< / kbd>< / label>< span>插入水平线规则< / span>< div class =help-list-item> < / div>< label style =width:180px; margin-right:10px;>< kbd> CTRL + K< / kbd>< / label>< span> Show Link Dialog< / span>< / div>< div class =modal-footer >< p class =text-center>< a href =// summernote.org/target =_ blank> Summernote 0.8.1< / a>·< a href = //github.com/summernote/summernote\"target =_ blank>项目< / a>·< a href =// github.com/summernote/summernote/issuestarget =_ blank>问题< / a>< / p>< / div>< / div>< / div>< / div

>



我的尝试:



无法找到关闭按钮的div类。

解决方案

使用jQuery非常简单。

 


。close); // ;然后做你想做的事。





jQuery [ ^ ]


您好,感谢 您的回复,但我需要找到摘要关闭按钮,我无法在摘要图片,视频,帮助等关闭按钮中找到,您可以帮我 out 


<<pre lang="HTML">div class="modal" aria-hidden="false" tabindex="-1"><div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Help</h4> </div> <div class="modal-body" style="max-height: 300px; overflow: scroll;"><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>ENTER</kbd></label><span>Insert Paragraph</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+Z</kbd></label><span>Undoes the last command</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+Y</kbd></label><span>Redoes the last command</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>TAB</kbd></label><span>Tab</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>SHIFT+TAB</kbd></label><span>Untab</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+B</kbd></label><span>Set a bold style</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+I</kbd></label><span>Set a italic style</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+U</kbd></label><span>Set a underline style</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+SHIFT+S</kbd></label><span>Set a strikethrough style</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+BACKSLASH</kbd></label><span>Clean a style</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+SHIFT+L</kbd></label><span>Set left align</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+SHIFT+E</kbd></label><span>Set center align</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+SHIFT+R</kbd></label><span>Set right align</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+SHIFT+J</kbd></label><span>Set full align</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+SHIFT+NUM7</kbd></label><span>Toggle unordered list</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+SHIFT+NUM8</kbd></label><span>Toggle ordered list</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+LEFTBRACKET</kbd></label><span>Outdent on current paragraph</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+RIGHTBRACKET</kbd></label><span>Indent on current paragraph</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+NUM0</kbd></label><span>Change current block's format as a paragraph(P tag)</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+NUM1</kbd></label><span>Change current block's format as H1</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+NUM2</kbd></label><span>Change current block's format as H2</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+NUM3</kbd></label><span>Change current block's format as H3</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+NUM4</kbd></label><span>Change current block's format as H4</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+NUM5</kbd></label><span>Change current block's format as H5</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+NUM6</kbd></label><span>Change current block's format as H6</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+ENTER</kbd></label><span>Insert horizontal rule</span><div class="help-list-item"></div><label style="width: 180px; margin-right: 10px;"><kbd>CTRL+K</kbd></label><span>Show Link Dialog</span></div> <div class="modal-footer"><p class="text-center"><a href="//summernote.org/" target="_blank">Summernote 0.8.1</a> · <a href="//github.com/summernote/summernote" target="_blank">Project</a> · <a href="//github.com/summernote/summernote/issues" target="_blank">Issues</a></p></div> </div></div></div
>

What I have tried:

unable to find the div class for close button.

解决方案

Using jQuery this is very easy.


(".close"); //; then do what you want.



jQuery[^]


Hi,Thanks for your response,but i need to find summarynote close button,i am unable to find in summarynote image,video,help etc close button ,can you please help me out.


这篇关于需要找到“关闭”在jquery中的多个div内的类。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆