Skip to main content

Bug Tracker

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);

}

}

});

Attachments (0)
Change History (2)

Changed September 11, 2013 09:50PM UTC by ajpiano comment:1

resolution: → plugin
status: newclosed

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.

Changed September 12, 2013 08:42AM UTC by axl.jq comment:2

There are already plugins for that task, as it's not that simple, so IMO it's not something to add to jQuery core.