The plugins site is currently in development.
We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.
recommended code overwrites current value (if specified)
| Project: | Default Value |
| Version: | 1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
can be solved by adding this to the elements.each() function
el.val(el.val() || def);
here's the entire method (modified):
elements.each(function() {
// Default values within scope
var el = $(this);
var def = args[c++];
el.val(el.val() || def);
el.focus(function() {
if (el.val() == def) {
el.val("");
}
el.blur(function() {
if (el.val() == "") {
el.val(def);
}
});
});
})
- Login to post comments
