trap click even on dropdown

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
grimblefritz
AppGini Super Hero
AppGini Super Hero
Posts: 336
Joined: 2015-12-23 16:52

trap click even on dropdown

Post by grimblefritz » 2016-07-12 17:30

What's the correct jquery to trap the change/click event of an AppGini-created dropdown?

I have a field 'method' that uses an option list of 'Box;;Truck;;Trailer'. I want to hide/show fields based on the current value of the dropdown.

Code: Select all

$j('#method').click(function(){
  //show/hide code here
  alert('You clicked a method');
});
That doesn't trigger the alert dialog when method is changed.

grimblefritz
AppGini Super Hero
AppGini Super Hero
Posts: 336
Joined: 2015-12-23 16:52

Re: trap click even on dropdown

Post by grimblefritz » 2016-07-14 14:21

Solved it.

Code: Select all

$j('#method-container').on('click', function(){
  //show/hide code here
  alert('You clicked a method');
});
[code]

Moh Youba
Veteran Member
Posts: 228
Joined: 2017-03-12 09:31

Re: trap click even on dropdown

Post by Moh Youba » 2019-11-22 21:18

Hello

I have the same problem, can you please share your code?

Thank you

Post Reply