我有这个代码
function DrawTipsProgress(postid, ajaxurl) {
var data = {
action: 'ajax_action',
post_id: postid
}
jQuery('#dashicon-' + postid).on("click", function () {
jQuery.post(ajaxurl, data, function(response) {
jQuery('#dashicon-' + postid).tooltip({
position: { my: 'center bottom' , at: 'center top-10' },
tooltipClass: "myclass",
content: response
});
jQuery('#dashicon-' + postid).tooltip('open');
});
});
}
Run Code Online (Sandbox Code Playgroud)
在第一次单击时,它按预期工作.如果稍后我尝试再次悬停按钮而不再单击工具提示弹出窗口,并且单击只是执行ajax调用但不打开工具提示.
我有这样的桌子
+------+----------+------------+
| id | 1_value | 2_value |
+------+----------+------------+
| 3 | foo1 | other |
| 10 | fooX | stuff |
| 13 | fooJ | here |
| 22 | foo7 | and |
| 31 | foou | here |
+------+----------+------------+
Run Code Online (Sandbox Code Playgroud)
我想要得到的是拥有行号
我试图做这样的事情
SELECT id, @curRow := @curRow + 1 AS row_number
FROM table
JOIN (SELECT @curRow := 0) r
Run Code Online (Sandbox Code Playgroud)
而且确实有效...
+------+--------------+
| id | row_number |
+------+--------------+
| 3 | 1 |
| 10 …Run Code Online (Sandbox Code Playgroud)