ssquire
Posts: 0
Joined: Tue Feb 12, 2013 4:36 am

Having trouble making component visible/invisible

I have tried using both jQuery & Javascript to change the visibility of a page component and it doesn't seem to be working (although I'm not perfect and it could be me too).

I simply have a button that when it is clicked an image should become invisible and another should become visible. I even created a test case of a button that when clicked executes the following in Javascript:

document.getElementById("strike_image_81").visible="false";

In jQuery I have:

$('strike_image_81').hide();
$('strike_image_82').show();

What could I be doing wrong for these components to not respond to this code?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Having trouble making component visible/invisible

Hi Steven,

If strike_image_81 and strike_image_82 are Component names then:
codeTiggzi('strike_image_81').hide();
Tiggzi('strike_image_82').show(); /code
If strike_image_81 and strike_image_82 are the Component IDs then:
code$('#strike_image_81').hide();
$('#strike_image_82').show();/code

ssquire
Posts: 0
Joined: Tue Feb 12, 2013 4:36 am

Having trouble making component visible/invisible

Thanks Katya! Using the Tiggzi API method worked, since they are component names. Just out of curiosity, how would I access them using the DOM?

Return to “Issues”