0

I have an input element with readonly set to true ("readonly"). However, when I try to apply a hover effect in jQuery, no results are seen.

Any ideas?

http://jsfiddle.net/zkJXY/

ThinkingStiff
  • 63,812
  • 29
  • 142
  • 238
benhowdle89
  • 35,602
  • 65
  • 197
  • 321

3 Answers3

1

the problem is your selector

change $('.input') into $('input') and it works

Manuel van Rijn
  • 9,957
  • 1
  • 26
  • 50
0

Your selector should be $(':input')

DEMO

defau1t
  • 10,457
  • 2
  • 33
  • 46
0

maybe removing readonly on mouseenter, adding it again on mouseleave. Example: http://jsfiddle.net/8X86r/2/

Teun Pronk
  • 1,357
  • 12
  • 23