Page 1 of 1

Hiding a SELECT object

Posted: Wed Mar 27, 2013 10:21 am
by Andy Parker

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.


Hiding a SELECT object

Posted: Wed Mar 27, 2013 10:52 am
by Maryna Brodina

Hello! Working on it. I'll update.


Hiding a SELECT object

Posted: Wed Mar 27, 2013 11:29 am
by Maryna Brodina

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


Hiding a SELECT object

Posted: Wed Mar 27, 2013 12:06 pm
by Andy Parker

It works!

Thank you ever so much for your wonderful support!

regards

Andy.