<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Form on Jeremy Jackson</title>
    <link>https://new.tsjee.ru/tags/form/</link>
    <description>Recent content in Form on Jeremy Jackson</description>
    <generator>Hugo</generator>
    <language>ru</language>
    <lastBuildDate>Wed, 01 Feb 2012 02:47:56 +0000</lastBuildDate>
    <atom:link href="https://new.tsjee.ru/tags/form/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Placeholder для форм на js</title>
      <link>https://new.tsjee.ru/posts/2012-02-01-placeholder-%D0%B4%D0%BB%D1%8F-%D1%84%D0%BE%D1%80%D0%BC-%D0%BD%D0%B0-js/</link>
      <pubDate>Wed, 01 Feb 2012 02:47:56 +0000</pubDate>
      <guid>https://new.tsjee.ru/posts/2012-02-01-placeholder-%D0%B4%D0%BB%D1%8F-%D1%84%D0%BE%D1%80%D0%BC-%D0%BD%D0%B0-js/</guid>
      <description>&lt;p&gt;Ниже следуший код выдергивает название label к текстфилдам и вставляет их как placeholder.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-jquery&#34; data-lang=&#34;jquery&#34;&gt;$(&amp;#39;#answ-cont label&amp;#39;).each(function(){&#xA;    var id = $(this).attr(&amp;#39;for&amp;#39;);&#xA;    var text = $(this).text();&#xA;    $(this).css(&amp;#39;display&amp;#39;, &amp;#39;none&amp;#39;);&#xA;    $(&amp;#39;input[type=&amp;#34;text&amp;#34;]#&amp;#39; + id).val(text);&#xA;    $(&amp;#39;input[type=&amp;#34;text&amp;#34;]#&amp;#39; + id).bind(&amp;#34;focus&amp;#34;, function(event) {&#xA;      if ($(this).val() === text)&#xA;      $(this).val(&amp;#34;&amp;#34;);&#xA;    });&#xA;    $(&amp;#39;input[type=&amp;#34;text&amp;#34;]#&amp;#39; + id).bind(&amp;#34;blur&amp;#34;, function(event) {&#xA;      if ($(this).val() === &amp;#34;&amp;#34;)&#xA;      $(this).val(text);&#xA;    });&#xA;  });&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
  </channel>
</rss>
