j-Button
A simple button component with great features.
- fully responsive
- supports validation
Configuration:
exec {String}required a path to thefunction(el, path)methodicon {String}Total JS icons (default:undefined)color {String}An icon color (default:undefined)validation {Boolean}Enables validation for all components on the path (default:true)delay{Number} a timeout for validation (default:100)name {String}a name for thenameattribute (default:submit)size {String}a size:smallnormal(default)largebig
ddos {String}A simple DDOS prevetion for multiple clicks, possible values:undefineddisables prevention10 secondssession1 day- etc.
if{String} can contain JS condition for evaluation(optional)value{Object} contains entire modelpath{String} contains changed path- must return boolean
track{String} can contain paths divided by comma which evaluate validation (executors for paths aren't components, but these methodsSET(),UPD(),INC(), etc.)validonly{Boolean} skipsdirtystate (default:false)
Use it with <ui-component name="button">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.
<div class="row">
<div class="col-md-3 col-xs-6">
<ui-component name="button" config="exec:clickme" class="hidden">Show me</ui-component>
</div>
</div>
<script>
function clickme() {
alert('Clicked!');
}
</script>