$(document.body).on('click', 'span', function (e) {
$(this).addClass('color');
// 1) squares can be either white, yellow or purple.
// 2) if a square is yellow and it's clicked on, it turns purple and visa versa
/* 3) there needes to be an enumeration of quadrants
and there needs to be at least four of them...
*/
// ajecent squares can only be clicked on based on initial pattern...
// then
});
Идея такова: [list] [*]случайное число, "скажем, 4000" [*]Я определил ограниченное пространство с помощью функции [*]Я хочу изменить свойства класса в соответствии с этими параметрами [*]Я хочу, чтобы 4000 блоков помещались в параметризованную область действия< /li> и я хочу менять цвет при нажатии [/list] Я застрял при создании полей «div». Любая помощь будет полезна;
[code]$(document.body).on('click', 'span', function (e) {
$(this).addClass('color');
// 1) squares can be either white, yellow or purple. // 2) if a square is yellow and it's clicked on, it turns purple and visa versa
/* 3) there needes to be an enumeration of quadrants and there needs to be at least four of them... */
// ajecent squares can only be clicked on based on initial pattern... // then