Please anybody can help me I have been faced Placeholder related issue in my project.It's work in Mozilla,Chrome,safari..etc.But it's not work in IE.Advanced thanks.
Description :
<form class="">
<input type="text" value="Email" id="inviteEmail"/>
<input type="text" value="Password" id="invitePassword">
</form>
var defaultTextEmail = '&{"Email"}';
var defaultTextPassword = '&{"general.password"}';
$(document).ready(function() {
$('#inviteEmail').bind('focus', function() {
$('#inviteEmail').val(defaultTextEmail);
var currentValue = $.trim($(this).val());
if(currentValue == 'Email') $(this).val('');
});
$('#inviteEmail').bind('blur', function() {
var currentValue = $.trim($(this).val());
if(currentValue == '') $(this).val('Email');
});
$('#invitePassword').bind('focus', function() {
$('#invitePassword').val(defaultTextPassword);
var currentValue = $.trim($(this).val());
if(currentValue == 'Password') {
$(this).val('');
$(this).prop('type', 'password');
}
});
$('#invitePassword').bind('blur', function() {
var currentValue = $.trim($(this).val());
if(currentValue == '') {
$(this).val('Password');
$(this).attr('type', 'text');
}
});
});
Now it's show proper hint messages in text boxes on all browsers rather than IE.I should show hint messages under text boxes but my client requirement is hint messages should show with in text boxes(For better appearance).I tried with 'value' attribute but it show password hint message with dots but not text.Please help me.Advanced thanks.