cgHtmlUtils examples

This is goeland client side html utility functions examples page

See also the debounce example

Documentation is available in docs directory

Back To the github home of this project

getEl('elementId') gives you a ref to that element id

cgHtmlUtils.getEl('aNiceSpan').innerHTML = 'it works !';

and the span with id aNiceSpan contains :

isNullOrUndefined(param1) returns true if param1 is not defined or null

function f1(a,b,c){
 console.log('a : ', a , cgHtmlUtils.isNullOrUndefined(a))
 console.log('b : ',b, cgHtmlUtils.isNullOrUndefined(b))
 console.log('c : ',c , cgHtmlUtils.isNullOrUndefined(c))
}
f1('hello')

will give you at the console :

a : hello false
b : undefined true
c : undefined true

The next section was added at runtime with "addDiv", content comes from "get*Param" functions.
try this link to experiment get*Param functions