title: HTML :: Add links to input tags
body: <p>I want to include a link to the <code>data-on</code> and <code>data-off</code> attributes so I can switch the website's idiom with a single click using a toggle. Have tried a script but no luck so far.</p>
  
  <p>HTML:  </p>
  
  <pre><code>&lt;input id ="toggle" data-toggle="toggle" data-on="English" data-off="Spanish" type="checkbox"&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function toggleEventInput() {
      $("#toggle").attr('data-on').html('&lt;a href="/language/en"&gt;&lt;/a&gt;');
      $("#toggle").attr('data-off').html('&lt;a href="/language/es"&gt;&lt;/a&gt;');
  }
  </code></pre>
  
  <p>TIA</p>