Page 1 of 1

Selecting multiple elements in the Appery JS API

Posted: Tue Mar 10, 2015 2:56 pm
by Elliot Lombardo

I have multiple html elements on one page. On a button press, I would like to show just one and hide the rest.

I am using

code
Apperyio('component1').hide();
Apperyio('component1').show();
/code

I would like to be able to target all the elements I want to hide in one function, such as Apperyio('component1, component2, component3').hide(); but this doesn't seem to work. Do I have to have an individual function for each element I want to hide?

Is there an easier way to hide all elements and only show one?

Thank you.


Selecting multiple elements in the Appery JS API

Posted: Wed Mar 11, 2015 10:08 am
by Illya Stepanov

Hi Elliot -

We are using jQuery in our JS API, so you can try using directly a multiple jQuery selectors -- http://api.jquery.com/multiple-selector/