Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing visibility property

I have a div which has a class name myClass and id name myId. The div has following style.

.myClass {
    height: 74%;
    margin-top: -1px;
    position: relative;
    overflow-y: auto;
    width: 100%;
    overflow-x: hidden;
    visibility: hidden;
}

When i try to change visibility from hidden to visible doing this

$('#myId').css({ 'visibility': 'visible' });

I am using id in JQuery instead of class because same class is applied to others elements too. My div is still not visible. What am I doing wrong?

like image 233
ozil Avatar asked Nov 11 '22 01:11

ozil


1 Answers

Yes you can do this by the following ways

$('#myId').css('display','block');

$('#myId').css('display','inline');

$('#myId').show();
like image 157
cpVariyani Avatar answered Nov 15 '22 10:11

cpVariyani