I am new to jQuery. I have the following code:
jQuery(document).ready(function() {
jQuery('#carousel').jcarousel();
});
It only applies to the first ul
with id="carousel"
, not for the others. How can I apply it to all elements which have the same ID?
HTML:
<!-- jQuery applies to this div -->
<div id="slideshow-carousel">
<ul id="carousel" class="jcarousel jcarousel-skin-tango">
<!-- ... -->
</ul>
</div>
<!-- jQuery does not apply for this div -->
<div id="slideshow-carousel">
<ul id="carousel" class="jcarousel jcarousel-skin-tango">
<!-- ... -->
</ul>
</div>
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…