HTML5 Placeholder jQuery Plugin is a jQuery plugin that enables HTML5 placeholder behavior for browsers that aren’t trying hard enough yet. You’ll still be able to use jQuery.val() to get and set the input values. If the element is currently showing a placeholder, .val() will return an empty string instead of the placeholder text, just like it does in browsers with a native @placeholder implementation. Calling .val('') to set an element’s value to the empty string will result in the placeholder text (re)appearing. The plugin automatically adds class="placeholder" to the elements that are currently showing their placeholder text. You can use this to style placeholder text differently.

Features

  • You can install jquery-placeholder by using Bower
  • Requires jQuery 1.6+
  • Works in all A-grade browsers, including IE6
  • Automatically checks if the browser natively supports the HTML5 placeholder attribute for input and textarea elements
  • Caches the results of its two feature tests in jQuery.fn.placeholder.input and jQuery.fn.placeholder.textarea
  • Makes sure it never causes duplicate IDs in your DOM

Project Samples

Project Activity

See All Activity >

Categories

HTML/XHTML

License

MIT License

Follow HTML5 Placeholder jQuery Plugin

HTML5 Placeholder jQuery Plugin Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of HTML5 Placeholder jQuery Plugin!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript HTML XHTML

Registered

2022-01-31