Placeholder not working in IE8 & IE9, even using a jQuery plugin

I’m using the following plugin to show the placeholder in IE8 and IE9. I think it worked the last year, and at this moment it isn’t:

https://github.com/mathiasbynens/jquery-placeholder

Read More

Actually, this plugin works perfect at the demo page: http://mathiasbynens.be/demo/placeholder

I really don’t know how to fix it. I’m using it in WordPress, where I load the local jQuery, which is normally the last version if I remember it well. I enqueue the scripts on functions.php:

function szt_load_scripts() {

wp_enqueue_style( 'style', get_stylesheet_uri() );
wp_enqueue_style( 'shortcodes', get_stylesheet_directory_uri() . '/shortcodes.css' );

wp_enqueue_script('jquery');

if ( is_singular() ) { 
    wp_enqueue_script( 'comment-reply' ); 
}

if (ot_get_option('szt_enable_linkbuilding') === "on") {
    wp_deregister_script( 'link-building-pro-min' );
    wp_register_script( 'link-building-pro-min', get_template_directory_uri().'/jquery/link-building-pro/link-building-pro-min.js', array(), true, true);
    wp_enqueue_script( 'link-building-pro-min' );
}

wp_enqueue_script('scripts', get_stylesheet_directory_uri() . '/jquery/scripts.js');
wp_localize_script('scripts', 'contactForm', array(
    'youForgot' => __('<span class="errormsg">You forgot to enter your ', 'wptheme'),
    'invalidEmail' => __('<span class="errormsg">You entered an invalid email.</span>', 'wptheme'),
    'messageSent' => __('<p class="thanks"><strong>Thanks!</strong> Your message was successfully sent.</p>', 'wptheme')
));
}

add_action('wp_enqueue_scripts', 'szt_load_scripts');

Am I loading the plugin in a wrong way?
Do I need to use an older version of jQuery?
Will I need to add a different fix for that?

Related posts

Leave a Reply

1 comment