Neil的备忘录

just do it
posts - 66, comments - 8, trackbacks - 0, articles - 0

I have the following jQuery code (similar to this question) that works in Firefox and IE, but fails (no errors, just doesn't work) in Chrome and Safari. Any ideas for a workaround?

$("#souper_fancy").focus(function() { $(this).select() });
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
ANSWER:

It's the onmouseup event that is causing the selection to get unselected, so you just need to add:

$("#souper_fancy").mouseup(function(e){
        e
.preventDefault();
});

只有注册用户登录后才能发表评论。


网站导航: