Methods - Yapapaya/jquery-cloneya GitHub Wiki

Cloneya provides two public methods:

getOption

Gets the options for a given instance of Cloneya.


$cloneContainer.cloneya();

var config = $cloneContainer.cloneya('getOption');

setOption

Sets any option for a given instance of Cloneya.


$cloneContainer.cloneya({
    maximum: 2
});

var config = $cloneContainer.cloneya('getOption');

console.log(config.maximum); // 2

$cloneContainer.cloneya(
    'setOption',
     {maximum: 5;}
);

var config = $cloneContainer.cloneya('getOption');

console.log(config.maximum); // 5

destroy

Destroys a given instance of cloneya. Removes all events, bindings and data related to Cloneya from the element.

$cloneContainer.cloneya();

$cloneContainer.cloneya('destroy');