我已将一个属性“id”添加到幻灯片。这个ID我需要工作,但是我不能够得到这个ID莫名其妙从幻灯片获取添加的ID
jssor_slider2.$On($JssorSlider$.$EVT_PARK, function (slideIndex, fromIndex) {
//it fires when current slide swith to another
});
这个火我希望能够得到这个ID,尝试$(本)的那一刻.attr(“ID” )和getElementById,但不起作用,所有结果都是未定义的。 这是我的幻灯片看起来像:
<div id="330" debug-id="slide-0" style="width: 600px; height: 800px; top: 0px; left: -600px; position: absolute; overflow: hidden; transform: perspective(2000px);"><div class="slider" style="transform: perspective(2000px);">uhedcwecnw0</div><div u="thumb" class="" style="display: none; transform: perspective(2000px);"><img src="http://192.168.0.16:8081/img/home.gif" style="height: 25px; transform: perspective(2000px);"></div><div style="width: 600px; height: 800px; top: 0px; left: 0px; z-index: 1000; display: none;"></div></div>
任何简单的方式来获得这个ID?
谢谢,就像一个魅力))) – user3763117 2015-03-02 15:51:25