benhowdle89
benhowdle89

Reputation: 37494

jQuery hover having no effect on a readonly input element

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/

Upvotes: 0

Views: 464

Answers (3)

Teun Pronk
Teun Pronk

Reputation: 1399

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

Upvotes: 0

defau1t
defau1t

Reputation: 10619

Your selector should be $(':input')

DEMO

Upvotes: 0

Manuel van Rijn
Manuel van Rijn

Reputation: 10315

the problem is your selector

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

Upvotes: 1

Related Questions