Side navigation
#14353 closed feature (plugin)
Opened September 11, 2013 05:55PM UTC
Closed September 11, 2013 09:50PM UTC
Last modified September 12, 2013 08:42AM UTC
IE 7 and IE8 do not support the placeholder.
Reported by: | danvsantos@gmail.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Some browsers do not have support in some placeholder inputs.
This function allows you to add functionality.
Add this function to jquery:
jQuery.fn.extend({
placeholder: function(strText){
$(this).focus(function(e){
$(this).val('');
});
$(this).blur(function(e){
if($.trim($(this).val()) == ''){
$(this).val(strText);
}
});
if($.trim($(this).val()) == ''){
$(this).val(strText);
}
}
});
Hi and thanks for your interest in contributing to the jQuery project. However, this proposal is outside of the scope of jQuery core and is much better suited for a plugin. There are a variety of HTML5 input attributes that are not supported in oldIE; polyfills for these behaviours, as well as the general category of reusable UI controls, are not the types of features that will be considered for inclusion in jQuery core.