I have 4 DIVs with different IDs (but have the same prefix (testDiv [1 | 2 | 3 | 4])), and I want to set their visblity (visible or hidden) on some event. How can I use something like this to determine the visibility property of a DIV once
$('testDiv*').css('visibility', 'visible');
OR
$('testDiv*').css('visibility', 'hidden');
There is a problem with this problem. I can have a class named ".comnClass" for all DIVs and change its property. But I want a solution with four different DIV identifiers.
THANK YOU ALL
source
share