0
0
0leg5ergeev2015-09-23 18:38:54
css
0leg5ergeev, 2015-09-23 18:38:54

Is it possible to create a condition on the presence of a css property?

those. If an object with id="fullpage" has an opacity property of 0.2, does any click on the page make the opacity equal to 1 ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Kim, 2015-09-23
@0leg5ergeev

Through jQuery for example:

if ($('#fullpage').css('opacity') == '0.2'){
  $('#fullpage').css('opacity', 1);
}

V
Valera Udav, 2015-09-23
@TARAKANhoy

In jQuery it would look something like this

$(document).on("click",function(){
    $("#fullpage").css("opacity","1");
});
JSFiddle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question