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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Click on image to unvisible

DenGrz
8-Gravel

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 ?

1 ACCEPTED SOLUTION

Accepted Solutions
sarora
5-Regular Member
(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
5-Regular Member
(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 !!

Top Tags