gpt4 book ai didi

jquery - 如何在framework7中使用jquery插件

转载 作者:行者123 更新时间:2023-12-01 07:45:23 25 4
gpt4 key购买 nike

该插件是 http://www.jsplugins.net/jquery-seat-charts-plugin/代码如下,我在f7中使用它,但它说“Uncaught TypeError: $$(...).seatCharts is not a function”我已经将 $ 更改为 $$。$(文档).ready(function() {

var sc = $('#seat-map').seatCharts({
map: [
'aaaaaaaaaaaa',
'aaaaaaaaaaaa',
'bbbbbbbbbb__',
'bbbbbbbbbb__',
'bbbbbbbbbbbb',
'cccccccccccc'
],
seats: {
a: {
price : 99.99,
classes : 'front-seat' //your custom CSS class
}

},
click: function () {
if (this.status() == 'available') {
//do some stuff, i.e. add to the cart
return 'selected';
} else if (this.status() == 'selected') {
//seat has been vacated
return 'available';
} else if (this.status() == 'unavailable') {
//seat has been already booked
return 'unavailable';
} else {
return this.style();
}
}
});

//Make all available 'c' seats unavailable
sc.find('c.available').status('unavailable');

/*
Get seats with ids 2_6, 1_7 (more on ids later on),
put them in a jQuery set and change some css
*/
sc.get(['2_6', '1_7']).node().css({
color: '#ffcfcf'
});

console.log('Seat 1_2 costs ' + sc.get('1_2').data().price + ' and is currently ' + sc.status('1_2'));

});

最佳答案

下载 jQuery 并将其添加到您的项目中。你需要在framework7.js之前编写它,因为它使用它。所以要小心你会在这里找到更多。 https://stackoverflow.com/a/35590532/6594294

关于jquery - 如何在framework7中使用jquery插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39051830/

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