Until the html5 placeholder attribute works on Gecko or IE browsers, you can use this following jQuery code:
// jQuery code
var i = document.createElement("input");
// Only bind if placeholder isn't natively supported by the browser
if (!("placeholder" in i)) {
$("input[placeholder]").each(function () {
var self = $(this);
self.val(self.attr("placeholder")).bind({
focus: function () {
if (self.val() === self.attr("placeholder")) {
self.val("");
}
},
blur: function () {
var label = self.attr("placeholder");
if (label && self.val() === "") {
self.val(label);
}
}
});
});
}
It’s not that I want to duplicate your internet site, but I really like the design. Could you tell me which theme are you using? Or was it tailor made?
Thanks for sharing this tips.
nice article, keep the posts coming
Thank you, I have recently been searching for information about this topic for ages and yours is the best I have discovered so far.
sweet
Thanks for the post
It’s not that I want to duplicate your internet site, but I really like the design. Could you tell me which theme are you using? Or was it tailor made?
What a great resource!
wohh just what I was searching for, appreciate it for putting up .
Great post for workaround in stupid ie browsers!