Skip to content

Commit baf150e

Browse files
committed
fix wenzhixin#2991: Add event parameters faq
1 parent fb9146e commit baf150e

3 files changed

Lines changed: 66 additions & 2 deletions

File tree

docs/_i18n/en/faq/faq.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,28 @@ $table.on('load-success.bs.table column-switch.bs.table page-change.bs.table sea
3030

3131
---
3232

33+
### Is event parameter put in the wrong order?
34+
35+
When you use like this:
36+
37+
```
38+
$('#eventsTable').on('click-row.bs.table', function (event, row, $element) {
39+
40+
});
41+
```
42+
43+
the first parameter is always `event`: http://jsfiddle.net/wenyi/e3nk137y/11688/
44+
45+
and use onClickRow event:
46+
47+
```
48+
onClickRow: function (row, $element) {
49+
50+
}
51+
```
52+
53+
---
54+
3355
### How can I support development of bootstrap-table?
3456

3557
All your ideas and feedback are very appreciated! Please feel free to open issues on GitHub or send me email.

docs/_i18n/es/faq/faq.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,30 @@ $table.on('load-success.bs.table column-switch.bs.table page-change.bs.table sea
3030

3131
---
3232

33+
### Is event parameter put in the wrong order?
34+
35+
When you use like this:
36+
37+
```
38+
$('#eventsTable').on('click-row.bs.table', function (event, row, $element) {
39+
40+
});
41+
```
42+
43+
the first parameter is always `event`: http://jsfiddle.net/wenyi/e3nk137y/11688/
44+
45+
and use onClickRow event:
46+
47+
```
48+
onClickRow: function (row, $element) {
49+
50+
}
51+
```
52+
53+
---
54+
3355
### How can I support development of bootstrap-table?
3456

3557
All your ideas and feedback are very appreciated! Please feel free to open issues on GitHub or send me email.
3658

37-
I'm also grateful for your donations: <a href="donate">{% t pages.donate.title %}</a>
59+
I'm also grateful for your donations: <a href="donate">{% t pages.donate.title %}</a>

docs/_i18n/zh-cn/faq/faq.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,28 @@ $table.on('load-success.bs.table column-switch.bs.table page-change.bs.table sea
3030

3131
---
3232

33+
### 事件参数位置错误?
34+
35+
当你使用:
36+
37+
```
38+
$('#eventsTable').on('click-row.bs.table', function (event, row, $element) {
39+
40+
});
41+
```
42+
43+
的时候,第一个参数总是 `event`http://jsfiddle.net/wenyi/e3nk137y/11688/
44+
45+
而使用 `onClickRow` 就正常:
46+
47+
```
48+
onClickRow: function (row, $element) {
49+
50+
}
51+
```
52+
3353
### 我要如何支持 Bootstrap Table 的开发?
3454

3555
非常感谢你的想法和建议,你可以到 GitHub 上提 issue 或者发邮件给我。
3656

37-
当然,假如你也可以 <a href="donate">{% t pages.donate.title %}</a> 我们的项目。
57+
当然,假如你也可以 <a href="donate">{% t pages.donate.title %}</a> 我们的项目。

0 commit comments

Comments
 (0)