Thursday, February 23, 2012

HTML5 Placeholder in IE7 and IE8 fixed with jquery

Using HTML5 Placeholder attribute in IE7 and IE8 is possible with the help of a block of jquery code.
Here goes the code -







11 comments:

  1. Great. But the password field will display "*****" when using this script.

    ReplyDelete
  2. It doesn't behave like the html5 placeholder (this one will dissapear as soon as you focus the input, the html5 waits until you type something)

    ReplyDelete
  3. cool!!!... but... how can I use in my blog? (on search-box in my blog)
    thank you!!!

    ReplyDelete
  4. $('input[placeholder]').each(function(){

    should be
    $('input').each(function(){

    since ie8 doesn't even know what placeholder is.
    unless you use a html5 shiv or modernizer

    ReplyDelete
  5. thanx for saving even this little time

    ReplyDelete
  6. Thanks a lot.

    This is the coffee version + only IE check.

    https://gist.github.com/4435322

    ReplyDelete
  7. This comment has been removed by a blog administrator.

    ReplyDelete