daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function fillinOperator() {
  2.     var defaultVal = "Комментарий для оператора...";
  3.  
  4.     $("#itemsForm").find("textarea").each(function () {
  5.         var jtextarea = $(this);
  6.         if (jtextarea.val() == '') {
  7.             jtextarea.attr({ value: defaultVal });
  8.         }
  9.         $(this).one("focus", function () {
  10.             if (this.value == defaultVal) {
  11.                 jtextarea.attr({ value: "" });
  12.             }
  13.         });    
  14.     });
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top