作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
该插件是 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/
我是一名优秀的程序员,十分优秀!