bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

.show() / .hide() mobileselectmenu component

I am trying to .show() or .hide() the dropdown mobileselectmenu component when a specific Button is clicked in my application.

I can easily do this by selecting the Visible property through the Events section.

Image

However the below does not work on the Select component and I need to be able to show or hide the Select component via javascript.

Image

Then I pulled the below line from the source code generated by Appery. This works, but I have no idea how or what the toggle function does ?

Image

What am I missing ? Please help !

Thanks in advance

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

.show() / .hide() mobileselectmenu component

Does:

code
Appery("componentName").toggle();
/code

work?

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

.show() / .hide() mobileselectmenu component

Sorry, it does not work.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

.show() / .hide() mobileselectmenu component

Hello! Try this:
codeAppery('componrntName').parents('[data-role="fieldcontain"]').toggle();/code

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

.show() / .hide() mobileselectmenu component

I can try it, but why does .show() and .hide() not work. Also, I don't what to simply toggle the visibility. I want to have the component shown at times and hidden at times.

Thanks

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

.show() / .hide() mobileselectmenu component

The toggle works, but like I said before, I want to show it times and hide it a times.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

.show() / .hide() mobileselectmenu component

show() and hide() work as well as toggle(). The problem was you were applying them to component, but it should be applied to codeAppery('componrntName').parents('[data-role="fieldcontain"]')/code
Try the following code:
codeAppery('componrntName').parents('[data-role="fieldcontain"]').show();
Appery('componrntName').parents('[data-role="fieldcontain"]').hide();/code

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

.show() / .hide() mobileselectmenu component

Am I misinterpreting the example at the bottom of the following page http://docs.appery.io/javascript-api/

If so how ?

Thanks

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

.show() / .hide() mobileselectmenu component

Both hide() and show() are standard jQuery functions, but mobileselectmenu is a complex component. For this component you need to that as shown above.

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

.show() / .hide() mobileselectmenu component

Thank you for your reply.

Where can I find detailed technical documentation for such nuanced issues. Don't get me wrong, you guys are great with your support, but I hate to always have to spend hours thinking its my problem, only to realize that it is something else.

This is the third time this has happened.

Love your product, but documenting your components would go a long way.

Return to “Issues”