cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Click on image to unvisible

DenGrz
10-Marble

Click on image to unvisible

Hello everyone,

 

I have a few images.

I want to put alle the images on the same place and that only one of the image is on same time visible.

 

For example:

The first image is visible. I click on the image, then the second image is visible and the first one unvisible. The i click on the second image, the third image is visible and the second image unvisible.

 

Is that possible?

Is there any code to do that so ?

ACCEPTED SOLUTION

Accepted Solutions
sarora
12-Amethyst
(To:DenGrz)

You can apply a javascript function on click of each image...something like the below code:-

 

$scope.clickImage1 = function(){
$scope.view.wdg['image-1']['visible'] = false;
$scope.view.wdg['image-2']['visible'] = true;
$scope.view.wdg['image-3']['visible'] = false;
}


$scope.clickImage2 = function(){
$scope.view.wdg['image-1']['visible'] = false;
$scope.view.wdg['image-2']['visible'] = false;
$scope.view.wdg['image-3']['visible'] = true;
}

 

and so on...

 

Hope this helps !!

View solution in original post

1 REPLY 1
sarora
12-Amethyst
(To:DenGrz)

You can apply a javascript function on click of each image...something like the below code:-

 

$scope.clickImage1 = function(){
$scope.view.wdg['image-1']['visible'] = false;
$scope.view.wdg['image-2']['visible'] = true;
$scope.view.wdg['image-3']['visible'] = false;
}


$scope.clickImage2 = function(){
$scope.view.wdg['image-1']['visible'] = false;
$scope.view.wdg['image-2']['visible'] = false;
$scope.view.wdg['image-3']['visible'] = true;
}

 

and so on...

 

Hope this helps !!

Announcements

Top Tags