WordPress
2
Вклад в тег
function slide_change_position() {
var first_left_slide = $('.active-slider').prev('.slide-class');
var second_left_slide = $(first_left_slide).prev('.slide-class');
var third_left_slide = $(second_left_slide).prev('.slide-class');
var first_right_slide = $('.active-slider').next('.slide-class');
var second_right_slide = $(first_left_slide).next('.slide-class');
var third_right_slide = $(second_left_slide).next('.slide-class');
$(first_left_slide, first_right_slide).addClass('slide-change-position-1');
$(second_left_slide, second_right_slide).addClass('slide-change-position-2');
$(third_left_slide, third_right_slide).addClass('slide-change-position-3');
}
slide_change_position();
.slide-class {
transition: 0.5s;
}
.slide-change-position-1 {
margin-top: 100px;
}
.slide-change-position-2 {
margin-top: 200px
}
.slide-change-position-3 {
margin-top: 300px;
}
$('.slider-class').on('afterChange', function(event, slick) {
slide_change_position();
});
<label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
<input type="checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" name="terms" <?php checked( apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST['terms'] ) ), true ); ?> id="terms" CHECKED/> <span><?php printf( __( 'I’ve read and accept the <a href="%s" target="_blank">terms & conditions</a>', 'woocommerce' ), esc_url( wc_get_page_permalink( 'terms' ) ) ); ?></span> <span class="required">*</span>
</label>