Page 1 of 2

.show() / .hide() mobileselectmenu component

Posted: Sun Sep 15, 2013 10:07 pm
by bahar.wadia

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


.show() / .hide() mobileselectmenu component

Posted: Sun Sep 15, 2013 10:23 pm
by maxkatz

Does:

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

work?


.show() / .hide() mobileselectmenu component

Posted: Mon Sep 16, 2013 2:51 pm
by bahar.wadia

Sorry, it does not work.


.show() / .hide() mobileselectmenu component

Posted: Mon Sep 16, 2013 3:45 pm
by Maryna Brodina

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


.show() / .hide() mobileselectmenu component

Posted: Mon Sep 16, 2013 6:46 pm
by bahar.wadia

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


.show() / .hide() mobileselectmenu component

Posted: Mon Sep 16, 2013 6:48 pm
by bahar.wadia

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


.show() / .hide() mobileselectmenu component

Posted: Mon Sep 16, 2013 7:33 pm
by Maryna Brodina

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


.show() / .hide() mobileselectmenu component

Posted: Mon Sep 16, 2013 8:02 pm
by bahar.wadia

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

If so how ?

Thanks


.show() / .hide() mobileselectmenu component

Posted: Mon Sep 16, 2013 8:52 pm
by Maryna Brodina

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


.show() / .hide() mobileselectmenu component

Posted: Mon Sep 16, 2013 9:29 pm
by bahar.wadia

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.