Due to my poor English, let me use example to explain my problem.
1, Go to http://jsfiddle.net/27xV2/1/ 2, Open firebug and go to console tab. 3, select an开发者_开发技巧y text at Result grid then it'll popup a box and click either Apply or Cancel button. 4, You'll see 1 in the console of firebug. 5, Repeat step 3, you'll see 2 1, 3 2 1.jQuery popBox plugin has been modified a little bit for my needs and the original one is at http://plugins.jquery.com/project/popBox , however, which works the same way.
I'm working on a project that must ensure the mouseup event only works once when it is activated.
I have spent 2 hours in this, however, I don't have any clue. How can I solve this problem?
Thx in advance, Jesse
You are attaching the click
events within the mouseup
event. Which means that they're attached every time the mouseup
event is fired. Move them outside and it should work.
On a side note: You're once calling attr('Id')
and the next time attr('id')
.
精彩评论