Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Hiding a SELECT object

Hi,

Firstly, this is a truly awesome piece of app dev software!

I have written an app and am happy with the functionality, but have stumbled at the last post.

I'm try to use Javascript to hide/show some SELECT objects.

I can get the code to work with a label, but not with select objects?

The code I'm using is below:
('mobileselect' is the SELECT object with several entries in its list)
('debugtext' is a label, and strangely enough, that shows the code is working even though the SELECT object does not hide).

var isVisible = Tiggr('mobileselect').is(':visible');

if (isVisible == true){
Tiggr('mobileselect').hide();
Tiggr('debugtext').text('HIDE');
}
else {
Tiggr('mobileselect').show();
Tiggr('debugtext').text('SHOW');

Can you help please? I've spend hours and hours trying different ways to solve this and have failed so far.

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

Hiding a SELECT object

Hello! Working on it. I'll update.

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

Hiding a SELECT object

Hello! In JQM Select consists of two parts - visible and invisible standard select. Your code shows/hides standard select - that's why it doesn't work. Try next code:

codevar isVisible = Tiggr('mobileselect').is(':visible');
if (isVisible == true){
Tiggr('mobileselect').parent().hide();
Tiggr('debugtext').text('HIDE');
}
else {
Tiggr('mobileselect').parent().show();
Tiggr('debugtext').text('SHOW');
}/code

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Hiding a SELECT object

It works!

Thank you ever so much for your wonderful support!

regards

Andy.

Return to “Issues”