#14353 closed feature (plugin)
IE 7 and IE8 do not support the placeholder.
Reported by: | 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); }
}
});
Change History (2)
comment:1 Changed 9 years ago by
Resolution: | → plugin |
---|---|
Status: | new → closed |
comment:2 Changed 9 years ago by
There are already plugins for that task, as it's not that simple, so IMO it's not something to add to jQuery core.
Note: See
TracTickets for help on using
tickets.
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.