angular-placeholder
Version:
Placeholder shim for IE8/IE9 and styling simplification.
33 lines (32 loc) • 1.05 kB
HTML
<html id="ng-app" ng-app="taiPlaceholder">
<head>
<title>Placeholder Demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.js"></script>
<script src="../lib/tai-placeholder.js"></script>
<style>
.placeholder {
color: red;
font-weight: bold;
text-transform: uppercase;
}
::-webkit-input-placeholder {
color: red;
}
:-moz-placeholder {
color: red;
}
::-moz-placeholder {
color: red;
}
:-ms-input-placeholder {
color: red;
}
</style>
</head>
<body>
<input type="text" ng-model="something" name="prepopulated" placeholder="Enter data" /><br>
<button type="button" ng-click="something = ''">Clear</button>
<button type="button" ng-click="something = 'testing'">Set Text</button>
</body>
</html>