https://rawgit.com/TecIce/Classy.js/master/source/Classy.min.js
-
Alias
Classy().register(Name, Callback(Arguments, $Classy));
-
Name
Type: "String"
rule: Can not contain hyphens
Sets the Classye to call to execute the callback. -
Callback
Type: Function(Arguments)
Sets the Classye to call to execute the callback.-
Arguments
type: [Array]
Returns the arguments defined next to Classy in HTML. -
$Classy
type: {Object}
Returns classy having the class name and current as predefined arguments. -
this
type:
Return the element where the callback is performing the actions. // If jQuery is imported, the return will be given by the element through jQuery
-
Classy('Classye', function(arguments, $Classy) {
this.innerHTML = arguments[0];
//If jQuery is installed
this.on('click', function() {
alert('Hello world!');
});
console.log($Classy.scope());
});
-
Classy name
Type: "String"
rule: Can not contain hyphens
Defines the classye that the element will execute upon loading. -
Arguments
Type: "String"
rule: Can not contain hyphens
Sets the Classye to be established for the HTML element. -
Character:
_
Type: Argument separador Separates the Classye name and its arguments.
<div class='Classy_argument_1_2_3'></div>
-
Alias
Classy().apply(Name, Element));
-
Return
Type: Function() Rerun the callback for an element of a specific classye.
-
Alias
Classy().applyAll(Name));
-
Return
Type: Function() Rerun the callback for all elements of the classye with the given name.
-
Return
Type: {Object}
Returns all defined Classyes, with their respective elements, which in turn, their arguments.{ MyClassy: { action: ƒ (arguments, $Classy), elements: [ 0: div#element.MyClassy_arg1_2_3 Classy: { MyClassy: [ 0: 'arg1', 1: 2, 2: 3 ] } ] } }
-
Return
Type: {Object}
Returns all defined Classyes, with their respective elements, which in turn, their arguments.