Im new to this.I have this jquery
<script type="text/javascript">
$(document).ready(function () {
$(".squares div").click(function () {
var colorSource = $(this).css("background-color");
$(".squares div").click(function () {
$(this).css("background-color", colorSource);
}
});
});
});
basically when i click on square it save the color and than I click on another square and it copy the color. the problem is when I click on 3rd square it copy the color from the square I already change its color. what can I do?
I think you want to copy the color of the last visited square, then try below,