PHP Classes

File: bootstrap/js/codemeCore.js

Recommend this page to a friend!
  Classes of Minh Tien  >  Noblesse CMS  >  bootstrap/js/codemeCore.js  >  Download  
File: bootstrap/js/codemeCore.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Noblesse CMS
Content management system with custom plugins
Author: By
Last change:
Date: 6 years ago
Size: 1,055 bytes
 

Contents

Class file image Download
function setBgColor(el,elValue)
{
	var len=el.length;
	
	for (var i = 0; i < len; ++i) {
	    el[i].style.backgroundColor = elValue;
	}
}
function setDisplay(el,elValue)
{
	var len=el.length;

	for (var i = 0; i < len; ++i) {

		if(elValue=='show')
		{
			el[i].style.display = '';
		}
		else
		{
			el[i].style.display = 'none';
		}
	    
	}
}

function setFadein(el)
{
  el.style.opacity = 0;

  var last = +new Date();
  var tick = function() {
    el.style.opacity = +el.style.opacity + (new Date() - last) / 400;
    last = +new Date();

    if (+el.style.opacity < 1) {
      (window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16)
    }
  };

  tick();
}

function setFadeinAll(el)
{
	var len=el.length;

	for (var i = 0; i < len; ++i) {
		setFadein(el[i]);	    
	}
}


function getText(el)
{
	var tmp=el.innerText;

	return tmp;
}

function getHTML(el)
{
	var tmp=el.innerHTML;

	return tmp;
}

function addClass(el)
{
	if (el.classList)
	  el.classList.add(className);
	else
	  el.className += ' ' + className;
}



For more information send a message to info at phpclasses dot org.