ViewerID์ SlideID์ Event๋ฅผ ๋ถ์ฌํ ์ ์์ต๋๋ค.
<script>
slideman.detect();
slideman
.addEventListenerByViewerId('test-slider-tap', 'slide', function(event){
document.getElementById('tst').innerHTML = '[VIEWER Slide]' +event.slideId;
})
.addEventListenerByViewerId('test-slider-tap', 'menuover', function(event){
document.getElementById('tst').innerHTML = '[VIEWER MenuOver]' +event.slideId;
})
.addEventListenerByViewerId('test-slider-tap', 'menuout', function(event){
document.getElementById('tst').innerHTML = '[VIEWER MenuOut]' +event.slideId;
})
.addEventListenerByViewerId('test-slider-tap', 'menuclick', function(event){
document.getElementById('tst').innerHTML = '[VIEWER MenuClick]' +event.slideId;
})
.addEventListenerBySlideId('slide2', 'slide', function(event){
document.getElementById('tst').innerHTML += ' [SLIDE2 Slide]' +event.slideId;
})
.addEventListenerBySlideId('slide2', 'menuover', function(event){
document.getElementById('tst').innerHTML += ' [SLIDE2 MenuOver]' +event.slideId;
})
.addEventListenerBySlideId('slide2', 'menuout', function(event){
document.getElementById('tst').innerHTML += ' [SLIDE2 MenuOut]' +event.slideId;
})
.addEventListenerBySlideId('slide2', 'menuclick', function(event){
document.getElementById('tst').innerHTML += ' [SLIDE2 MenuClick]' +event.slideId;
});
</script>
<body>
<div id="tst">
Testing..
</div>
<div data-type="slideview" data-viewer="test-slider-tap" style="width:350px; height:150px; border:1px solid black;">
<div data-type="tap"></div>
<div data-type="storage">
<div data-slide="slide1">
<div data-type="title">์๋
ํ์ธ์</div>
<div>
1๋ฒ์งธ ์ฌ๋ผ์ด๋<br/>
๋ชจ๋ฐ์ผ ๊ฒฝ์ฐ ์ผ์ชฝ์ผ๋ก(<<) ์ธ์ด๋ณด์ธ์.
</div>
</div>
<div data-slide="slide2">
<div data-type="title">์๊ณ ํ์ธ์</div>
<div>
2๋ฒ์งธ ์ฌ๋ผ์ด๋
</div>
</div>
<div data-slide="slide3">
<div data-type="title">์ด์์ค์ธ์</div>
<div>
3๋ฒ์งธ ์ฌ๋ผ์ด๋<br/>
๋ชจ๋ฐ์ผ ๊ฒฝ์ฐ ์ค๋ฅธ์ชฝ์ผ๋ก(>>) ์ธ์ด๋ณด์ธ์.
</div>
</div>
</div>
</div>
</body>