Question: Want to start function if user clicked on `id^="mark_paid_used"` or value changed in class `paid_used_amount_for_below_header_debit`

such codes works

```
 $('[id^="mark_paid_used"]').click(function(){
     //do something
 });

```

.

```
 $('.paid_used_amount_for_below_header_debit').change(function() {
     //do the same as above
 });

```

but this does not work

```
$('.paid_used_amount_for_below_header_debit').change || $('[id^="mark_paid_used"]').click(function() {

 });

```

What would be correct code?

Answer: 
Call a function then add it as an event 

```
var getfunction = function(){

 };

$('[id^="mark_paid_used"]').click(getfunction);
     $('.paid_used_amount_for_below_header_debit').change(getfunction);

```
Define a function, and execute it when something happens.

```
function anyname(){
    // your code
}

$('.paid_used_amount_for_below_header_debit').change(function(){anyname();});
$('[id^="mark_paid_used"]').click(function(){anyname()});

```