Placeholder - Not support in operamobile - Jquerymobile
The text box place holder does not support in the OperaMobile10.0. But Its working fine with safari. How t开发者_如何学Co solve this one?
Please help me.
THanks in advance.
That's a problem with the browser. The attribute placeholder
is a HTML5 attribute, which is also not supported by Internet Explorer 9 in the latest version.
$(document).ready(function(){
$('input[type=text]').focus(function(){
if($(this).val() == $(this).attr('defaultValue'))
{
$(this).val('');
}
});
$('input[type=text]').blur(function(){
if($(this).val() == '')
{
$(this).val($(this).attr('defaultValue'));
}
});
});
http://pinoytech.org/question/4595584/how-can-i-improve-this-basic-jquery-code
精彩评论