我想从一个站点滑动到另一个站点,但是如何?
我的代码:
enter code here
function processingRoutine() {
var swipedElement = document.getElementById(triggerElementID);
if ( swipeDirection == 'left' ) {
// REPLACE WITH YOUR ROUTINES
//swipedElement.style.backgroundColor = 'orange';
event.preventDefault();
} else if ( swipeDirection == 'right' ) {
// REPLACE WITH YOUR ROUTINES
//swipedElement.style.backgroundColor = 'green';
event.preventDefault();
} else if ( swipeDirection == 'up' ) {
// REPLACE WITH YOUR ROUTINES
//swipedElement.style.backgroundColor = 'maroon';
} else if ( swipeDirection == 'down' ) {
// REPLACE WITH YOUR ROUTINES
//swipedElement.style.backgroundColor = 'purple';
}
和html代码
enter code here
<?php
include ("y.html");
?>
</div>
<div class="swipe-item" data-part="1">Ich bin Seite Y</div>
<button onclick="jQuery('#swiper').trigger('left')">Swipe Up</button>
<button onclick="jQuery('#swiper').trigger('right')">Swipe Down</button>
我想看起来像这样:
x-html(滑动)到 y.html
和
y-html(滑动)到 x.html
前后左右,我需要帮助