沒有人知道我可以在一個標籤添加一個類:在錨標記一個div中添加類使用jQuery
<a href="/souscription/digital-vie">Subscribe</a>
這裏是我的html:
<div class="module" id="prod-subscription">
<div class="entity entity-bean bean-ap-bl-instruct contextual-links-region block container">
<div class="contextual-links-wrapper contextual-links-processed">
<a class="contextual-links-trigger" href="#">Configure</a>
<ul class="contextual-links">
<li class="bean- first last">
<a href="/block/souscription/edit?destination=node/3719"> bloc</a>
</li>
</ul>
</div>
<div class="row">
<div class="col-md-3">
<h2>simple<span>in 3 </span></h2>
</div>
<div class="col-md-6">
<ol>
<li>
<span>1</span><p>text</p>
</li>
<li>
<span>2</span><p>texte testx</p>
</li>
<li>
<span>3</span><p>and text</p>
</li>
</ol>
</div>
<div class="col-md-3">
<a href="/souscription/digital-vie">Subscribe</a>
</div>
</div>
</div>
</div>
你能在這些DOM元素添加一些ID? – ddb
id =「prod-subscription」在主div中! – Mamadou
我指的是目標錨,所以解決方案會更簡單:) – ddb