I have tired a few placeholder plugins to get it to work in IE. Currently I'm using http://widgetulous.com/placeholderjs/. This works in IE8 & 9 but not IE7. It throws a SCRIPT1028: Expected identifier, string or number placeholder.js, line 182 character 5 SCRIPT5009: 'Placeholder' is undefined csr-form.html, line 72 character 3 - This is where I call the placeholder.js via:
$(function(){
// Placeholder
Placeholder.init();
});
Does anyone know how to get this to work in IE7 or can someone suggest another plugin that works in IE7?
UPDATED Here is the fiddle, http://jsfiddle.net/clintongreen/NLWRL/
Thanks
I'm using Placeholder-jQuery-Plugin by mathiasbynens at work.
It says IE6+ is supported, and we haven't had any troubles with IE7.
Usage is nice — set the placeholder attribute in your input tags and call $('input').placeholder();
in your $(function())
ah, your problem is a trailing comma in a hash like this
{
'this':'blows',
'up': 'ie7',
}
edit: yep i see it, your utils
hash in that fiddle has a trailing comma after it.
here is the fix: http://jsfiddle.net/NLWRL/1/
not tested in ie7, there might be more trailing commas hiding in there for you to find
by the way when you see Expected identifier, string or number
in ie7, 9/10 times its a trailing comma.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With