gpt4 book ai didi

javascript - Ratchet 删除/添加数据忽略 ="push"

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:23:27 25 4
gpt4 key购买 nike

使用 Ratchet 框架,我可以滑入/滑出任何页面,我遇到了在滑到下一页之前必须先获取数据的情况。我可以获取数据,但页面的幻灯片过渡消失了。有办法做到这一点吗?

我这里有这个示例 anchor :

<a href="next-link.html" data-transition="slide-in" data-want="I want this data here">Next link</a>

尝试使用,

$('a').each(function() {

`var $this = $(this);`

`$this.attr('data-ignore', 'push');`

`$this.click(function(e) {`

`e.stopPropagation();`

`//... get the data here $this.attr('data-want')`

`$this.attr('data-ignore', '');`

`});`

});

最佳答案

改用.data():

$this.data('ignore', 'push');

并将其设置为空

$this.data('ignore', '');

关于javascript - Ratchet 删除/添加数据忽略 ="push",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23940174/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com