4
我正在使用jquery tabslideout插件。它wporks罰款,但我想檢測當tablideout插件滑入和滑出。如果我能檢測到,那麼我可以調用另一個例程。當tablideout div滑入和滑出時,沒有任何想法可以確定如何捕獲。 所以請指導我。在這裏感謝jquery tabslideout插件,並希望檢測div滑入和滑出
是我的代碼
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
<script src="http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js"></script>
<script type="text/javascript">
$(function(){
$('.slide-out-div').tabSlideOut({
tabHandle: '.handle', //class of the element that will become your tab
pathToTabImage: 'images/contact_tab.gif', //path to the image for the tab //Optionally can be set using css
imageHeight: '122px', //height of tab image //Optionally can be set using css
imageWidth: '40px', //width of tab image //Optionally can be set using css
tabLocation: 'left', //side of screen where tab lives, top, right, bottom, or left
speed: 300, //speed of animation
action: 'click', //options: 'click' or 'hover', action to trigger animation
topPos: '200px', //position from the top/ use if tabLocation is left or right
leftPos: '20px', //position from left/ use if tabLocation is bottom or top
fixedPosition: false //options: true makes it stick(fixed position) on scroll
});
});
</script>
<style type="text/css">
.slide-out-div {
padding: 20px;
width: 250px;
background: #ccc;
border: 1px solid #29216d;
}
</style>
<div class="slide-out-div">
<a class="handle" href="http://link-for-non-js-users.html">Content</a>
<h3>Contact me</h3>
<p>Thanks for checking out my jQuery plugin, I hope you find this useful.
</p>
<p>This can be a form to submit feedback, or contact info</p>
</div>
如果你ü請你簡單解釋一下你是如何在現有代碼中添加這兩個回調會有幫助的。請討論。我有另一個請求,可以請你實現兩個像以前的幻燈片退出和滑入之前的回調....謝謝 – Thomas
@Thomas我更新了它是如何完成的問題:) – AbstractChaos
這是輝煌的,正是我正在尋找,謝謝 –