-3

How can I create effect(by jquery) in web page when user select a part of text then focus paragraph and dark other part of page? How can create this effect? For example can see this link

this image show the web page before select the text(top of image) and when select a part of text bye mouse cursor(bottom of image): view image

1 Answers1

0

you can use CSS transitions and JQuery

here is my solution with using of css transition and jquery

a {
  color:blue;
  /* First we need to help some browsers along for this to work.
     Just because a vendor prefix is there, doesn't mean it will
     work in a browser made by that vendor either, it's just for
     future-proofing purposes I guess. */
  -o-transition:color .2s ease-out, background 2s ease-in;
  -ms-transition:color .2s ease-out, background 2s ease-in;
  -moz-transition:color .2s ease-out, background 2s ease-in;
  -webkit-transition:color .2s ease-out, background 2s ease-in;
  /* ...and now for the proper property */
  transition:color .2s ease-out, background 2s ease-in;
}

edited DEMO LINK

Farshad
  • 1,465
  • 1
  • 9
  • 12