Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

grid toggle not working

On my login page I have 2 buttons, 'Login' and 'Sign Up'

I also have 2 grids (signin_grid, signup_grid) both containing inputs and buttons that are relevant to Logging in and Signing up.

on page load the JS:
preApperyio("signup_grid").hide();
Apperyio("signin_grid").hide();/pre

Login btn click JS:
preApperyio("signin_grid").toggle();
Apperyio("signin_Email").focus();
Apperyio("signup_grid").hide();/pre

Sign up btn click JS:
preApperyio("signup_grid").toggle();
Apperyio("signup_firstname").focus();
Apperyio("signin_grid").hide();/pre

This had been working fine for a good few months before christmas.
For some reason now when either button is clicked the grids dont appear.

I changed it to .show rather than .toggle

Login btn click JS:
preApperyio("signin_grid").show();
Apperyio("signin_Email").focus();
Apperyio("signup_grid").hide();/pre

This worked, and so did the rest of the code, so it appears that the .toggle function is not working for the grid component.
I changed the it back to .toggle instead of show and I removed the grid.hide on page load.
This time when the button was clicked the grid disappeared, but when clicked again the grid did not re-appear. so it seems like that toggle function is just hiding the component rather than toggling it.

I've tested the toggle function on other components and it works for them.

As a work around i'm using .hide and .show but it needs fixing.

I've tried this in chrome and safari and the problem is the same for both.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

grid toggle not working

Hi Joe,

Please use following JS code to hide/show grid:

pre

//To hide grid
Apperyio("mobilegrid_47").closest('[data-wrapper-for]').hide();

//To show grid
Apperyio("mobilegrid_47").closest('[data-wrapper-for]').show();

/pre

Regards.

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

grid toggle not working

Is there a way to toggle a grid yet?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

grid toggle not working

Hello Jack,

Yes, you can use JS above for that. Could you clarify what you have tried and what exactly does not work?

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

grid toggle not working

Apperyio("signup_grid").toggle(); did not seem to do any show or hide functionality.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

grid toggle not working

Please use JS below:

preApperyio("signup_grid").parent().toggle();/pre

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

grid toggle not working

That does not work. Nothing seems to happen
I am testing on a test page with one label in a grid and one button outside the grid that triggers the JS.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

grid toggle not working

It works fine on our enviroment.

Please provide us with a public app link(https://devcenter.appery.io/documenta...) and steps to reproduce.

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

grid toggle not working

Sorry for the confusion Sergiy. I have successfully gotten the code you gave to work.

Sorry for taking up your time.

Return to “Issues”