# j-Click

> The component calls a method or can set a value according to the path.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 09cf2ecb4bf9b2d71805f552ef77dd46e5757ae9e76234a1bcb0f0740ec30849
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

The component calls a method or can set a value according to the path.

__Configuration__:

- `enter` {String} (optional) is a jQuery selector
- `value` {String/Number/Boolean} (optional) this value will be set to `data-jc-path`
- `disabled` {Boolean} disables this control

Use it with `<ui-component name="click">`. 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.

```html example.html
<div id="form">
    <div><input type="text" placeholder="press enter" /></div>
</div>
<div><button><ui-component name="click" path="doSubmit" config="enter:#form">SUBMIT</ui-component></button></div>
<br />
<div><button><ui-component name="click" path="user.name" config="value:Peter">SET VALUE user.name</ui-component></button></div>
<ui-bind path="user.name" config="text"></ui-bind>

<script>
	function doSubmit() {
        alert('SUBMIT');
    }
</script>
```
