Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 在开发模式下实现wix动画_Jquery_Css_Velo - Fatal编程技术网

Jquery 在开发模式下实现wix动画

Jquery 在开发模式下实现wix动画,jquery,css,velo,Jquery,Css,Velo,我正在尝试为Wix网站创建菜单。当用户点击汉堡图标时,它应该从右边滑入,当用户点击X时,它应该从左边滑出 以下是我目前的代码: // #verticalMenu1 is the menu, #text15 is the X, #iconButton4 is the hamburger. // I don't know how I can change the IDs either, I'm new to Wix. import wixAnimations from 'wix-animation

我正在尝试为Wix网站创建菜单。当用户点击汉堡图标时,它应该从右边滑入,当用户点击X时,它应该从左边滑出

以下是我目前的代码:

// #verticalMenu1 is the menu, #text15 is the X, #iconButton4 is the hamburger.
// I don't know how I can change the IDs either, I'm new to Wix.

import wixAnimations from 'wix-animations';

$w.onReady(function () {
    var timeline = wixAnimations.timeline();

    $w("#verticalMenu1").hide();
    $w("#text15").hide();

    $w("#iconButton4").onClick(function() {
        $w("#verticalMenu1").show();
        timeline.add($w('#verticalMenu1'), {y: 20, duration: 1900, easing: 'easeInSine'})
        $w("#iconButton4").hide();
        $w("#text15").show();
    });

    $w("#text15").onClick(function() {
        $w("#verticalMenu1").hide();
        $w("#iconButton4").show();
        $w("#text15").hide();
    }); 

});

如果有人很了解Wix并能帮助我,那就太棒了!谢谢!:)

在将标签添加到帖子之前,只需检查标签即可。wix是“windows installer xml”标记,而不是网站构造函数