我已將一個屬性「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