-2
$('#scroller').css('transform');

This div is a default value.

Transform scale(1)

i want to change value. if #scroller transform scale(3) give me alert?

Thanks

1 Answer 1

0

$('#scroller').css('transform', 'scale(3)'); alert('Changed');

The css change will always execute before the alert. See also In JQuery, Is it possible to get callback function after setting new css rule?

Sign up to request clarification or add additional context in comments.

1 Comment

Additionally $('#scroller').css('transform', 'scale(3)') will be 'truthy' even when there is no div on the page called #scroller, so if you had an if statement it will always run.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.