File: files/functions.js

Recommend this page to a friend!
  Classes of Jesus Tovar   JS Show or Hide Controls   files/functions.js   Download  
File: files/functions.js
Role: Application script
Content type: text/plain
Description: js code
Class: JS Show or Hide Controls
Show or hide multiple element in a Web page
Author: By
Last change:
Date: 9 years ago
Size: 500 bytes
 

Contents

Class file image Download
var functions ={ //Receives a string of ids, example: ""idOne,idTwo,idThree"' showControls : function(ids,show){ //first create an array with ids paramater var controls = ids.split(","); //get element size var j = controls.length; //validate if is show or not for(i=0;i<=j;i++){ if (show) $("#"+controls[i]).show(); else $("#"+controls[i]).hide(); } } }