我有一个包含一些html元素的div.他们都有一个名为的班级
class="fileItem read write".
但是可能有一个元素
class="fileItem read write selected".
现在我希望使用附加的"selected"标签获取此元素并对其进行编辑.目前我有一个JQuery
$(".fileItem").click(function(){
// Code
});
Run Code Online (Sandbox Code Playgroud)
检测其中一个fileItem的点击.
在这里,我想用'selected'标签编辑元素的样式标记.那么有什么我可以说的全部按类别选择并选择"选中"?