Test Case for zjrJS.Doc.hC() - Stable Test Suite for zjrJS

This information lives on a webpage hosted at the following web address: 'https://www.omegajunior.net/code/zjrjs/stable.php'.

Showing whether zjrJS.Doc.hC() actually works.

Used zjrJS Version:

Stable Minified version 20141202t2322 of zjrJS.


 

Preconditions
Javascript must be allowed to run on this page.

Successful When...
In the form, after pressing the hC button, the Output box receives an overview of whether or not the box itself was attributed the following classes: box, text, hidden, output. For the class "hidden", the result is negative. The other classes return positive.
Actions
Output

Test Code:

          var test=({
	run: function () {"use strict";
		if ( !test.require( "zjrJS.Doc.hC", "function" ) ) {
			return false;
		}
		var classes = ["box", "hidden", "output", "text"], 
		i = 0, s = '', 
		one = window.document.forms.one.elements;
		while( i < 4 ){
			s += classes[ i ] + ': '
			+ zjrJS.Doc.hC( classes[ i ], one.output )
			+ "\r";
			i += 1;
		}
		one.output.innerHTML = s;
		classes = one = null;
		return false;
	}
});
        

Download:

Download zjrJS’ latest stable build (20141202t2322) minified (7.1KB).

Download zjrJS’ latest stable build (20141202t2322) (11.9KB).

Clicky Analytics