HTML 5 Placeholder compatible with IE7 and IE8

IE, as usually, creates problems even with simple things for other browsers, like Placeholders. After a long search for a compatible solution with IE older versions 7 and 8 I found ithttp://webcloud.se/code/jQuery-Placeholder/ . It is working properly and it is very easy to install and use, just add the following two lines in your <head> area:

<script src=”<?php bloginfo(‘stylesheet_directory’); ?>/js/jquery.placeholder.js”></script>
<script>jQuery(“input[placeholder]”).placeholder();</script>

Update

I discovered the link above is not working anymore so i purpose a new solution i recently tested it:

  • download the js file from here
  • include it in the <head> section (<script src=”<?php bloginfo(‘stylesheet_directory’); ?>/js/jquery.placeholder.js”></script>)
  • add the script below

jQuery(document).ready(function(){
jQuery('input[placeholder],textarea[placeholder]').placeholder();
});

 

1 Comment
  • aion kinah
    December 20, 2012

    This site was… how do you say it? Relevant!! Finally I have found something that helped me. Thanks!

Leave a Reply

Secured By miniOrange