krzyhub
krzyhub

Reputation: 6540

jQuery - avoiding marking elements in web browser on double clicking them

When i double clicking some element in my web browser it mark it with blue marking. Is there possibility in jQuery to avoid this behavior?

Upvotes: 1

Views: 215

Answers (2)

ShankarSangoli
ShankarSangoli

Reputation: 69905

You can try this

$("anySelector").bind("selectstart", function(){
  return false;
});

Upvotes: 1

Julian
Julian

Reputation: 2061

If you mean a blue outline, it is possible to remove that by explicitly stating

outline: 0

In the CSS.

This can form part of a CSS reset, which is to start your CSS with

* {
   outline: 0;
   .
   .
   .
}

Upvotes: 0

Related Questions