Toggle Hide/Show JS
Ok, I used a small JS so that the training assistants can apply quickly a toggle Hide/Show an image without going to create advanced actions, etc. Very simple:
function showHide(parameter, parameter2, parameter3){
if(parameter.style.visibility == 'hidden'){
parameter.className=parameter2;
parameter.style.visibility='visible';
}
else
{
parameter.className=parameter3;
parameter.style.visibility='hidden';
}
And from CP they type in the JS button, showHide(nameImage, blurIn, blurOut);
All working everything it´s fine, but the fact is what if I have 3 or more buttons I would like to hide all the elements that are visible from the first button and then show the elements of the second button, usin Jquery then I´m using the selector:
$('canvas[id*="Image"],canvas[id*=Text_Caption_]').each(function(i, el){
if(this.className == 'blurIn'){
this.style.visibility='hidden'
this.className='blurOut'
}else{}
})
And do not work, I dont want to use a interval to hide all the objects I would like to try another method and I´m smashing my head on the table, already try a few options without success any CPJS expert can help me out?
