FatDogMark
FatDogMark

Reputation: 1205

How to make div invisible to still able to click?

How to make div invisible to still able to click? display hidden or hide() will make it disappear but I want user still able to click it, as i put it on top of another object

Upvotes: 2

Views: 4551

Answers (3)

Michael Antonius
Michael Antonius

Reputation: 972

Maybe you'd like to use opacity:0; or visibility:hidden;:

.element {
  opacity:0;
}

or:

.element {
  visibility:hidden;
}

Hope it works! Good luck!

Upvotes: 0

David Bullock
David Bullock

Reputation: 6254

If the <div/> does not contain any contents, you could:

#mydiv {
  background-color: transparent;
  height: 50px;
  width: 50px;
}

See the CSS2.1 property background-color

Upvotes: 3

user1726343
user1726343

Reputation:

You could set its opacity to 0. The opacity can be animated using animate:

$('#mydiv').animate({opacity: 0});

Upvotes: 8

Related Questions