Elliot Lombardo
Posts: 0
Joined: Thu Jan 29, 2015 7:16 pm

Selecting multiple elements in the Appery JS API

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.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Selecting multiple elements in the Appery JS API

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/

Return to “Issues”