Using jQuery I'm programmatically generating a bunch of div
's like this:(使用jQuery,我以编程方式生成了一堆div
,如下所示:)
<div class="mydivclass" id="myid1">Some Text1</div>
<div class="mydivclass" id="myid2">Some Text2</div>
Somewhere else in my code I need to detect if these DIVs exist.(我需要在代码的其他位置检测这些DIV是否存在。) The class name for the divs is the same but the ID changes for each div.(div的类名称相同,但每个div的ID均更改。) Any idea how to detect them using jQuery?(知道如何使用jQuery检测它们吗?)
ask by avatar translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…