Simulates the slider turning off and on - Node.js HTML

Node.js examples for HTML:Form

Description

Simulates the slider turning off and on

Demo Code


/**//from   w ww. j a  v a  2  s . c o m
 * Simulates the slider turning off and on
 */
function toggleSlider() {
  var s=document.getElementById('slider');
  s.getAttribute('y') == 2 ? s.setAttribute('y',16) : s.setAttribute('y',2);
}

Related Tutorials