Hello everyone,
With Julia Interact, how can I change button color on odd clicks?
Here’s my unsuccessful attempt:
heart(color) = button(latex(“\heartsuit”),
style=Dict(:color => color,
:backgroundColor => “white”,
:width => “40px”,
:height => “40px”,
:fontSize => “30px”))
heart_button() =
@manipulate for b=heart(“gray”)
if b == 0
nothing
elseif isodd(b)
heart(“black”)
display(“black”)
else
display(“white”)
end
end
heart_button()
Thanks in advance!