Size: a a a

jQuery — русскоговорящее общество

2020 February 27

ДВ

Данил Васильевич in jQuery — русскоговорящее общество
Artush Artush
При нажатии кнопки «Создать» динамически создайте 10 подразделений и разместите их в разных частях страницы.
Меняйте координаты делителя каждые 500 миллисекунд и присваивайте им случайные значения
Если вы дадите переход, то окажется, что демон движется в случайных направлениях.
Остановите движение каждого дьявола, когда вы нажимаете
это набор слов. Он непонятен.
источник

AA

Artush Artush in jQuery — русскоговорящее общество
Данил Васильевич
это набор слов. Он непонятен.
At the click of the Create button dynamically create 10 divisions and place them on different parts of the page
Change the divider coordinates every 500 milliseconds and give them random values
If you give a transition, it will appear that the demon is moving in random directions
Stop each devil's movement when you click
источник

AA

Artush Artush in jQuery — русскоговорящее общество
At the click of the Create button dynamically create 10 div and place them on different parts of the page
Change the div coordinates every 500 milliseconds and give them random values
If you give a transition, it will appear that the demon is moving in random directions
Stop each devil's movement when you click
источник

ДВ

Данил Васильевич in jQuery — русскоговорящее общество
Artush Artush
At the click of the Create button dynamically create 10 divisions and place them on different parts of the page
Change the divider coordinates every 500 milliseconds and give them random values
If you give a transition, it will appear that the demon is moving in random directions
Stop each devil's movement when you click
Stop each devil's movement when you clic
What click?
источник

ДВ

Данил Васильевич in jQuery — русскоговорящее общество
Artush Artush
At the click of the Create button dynamically create 10 div and place them on different parts of the page
Change the div coordinates every 500 milliseconds and give them random values
If you give a transition, it will appear that the demon is moving in random directions
Stop each devil's movement when you click
the text is not complete
источник

AA

Artush Artush in jQuery — русскоговорящее общество
վ
источник

AA

Artush Artush in jQuery — русскоговорящее общество
When you press the div, the div will stop
источник

ДВ

Данил Васильевич in jQuery — русскоговорящее общество
Artush Artush
When you press the div, the div will stop
you need a button to stop the deamon creation cycle?
источник

AA

Artush Artush in jQuery — русскоговорящее общество
Данил Васильевич
you need a button to stop the deamon creation cycle?
i need it to stop when div is pressed
источник

ДВ

Данил Васильевич in jQuery — русскоговорящее общество
Artush Artush
i need it to stop when div is pressed
you need an event to listen to, and a condition for stopping the loop
источник

AA

Artush Artush in jQuery — русскоговорящее общество
Данил Васильевич
you need an event to listen to, and a condition for stopping the loop
how will toggle be organized?
источник

ДВ

Данил Васильевич in jQuery — русскоговорящее общество
Artush Artush
как сделать так, чтобы ни один из кликов DIV не двигался
put your code here http://codepen.io
need to look at him
источник

ДВ

Данил Васильевич in jQuery — русскоговорящее общество
Artush Artush
how will toggle be organized?
toggle what? jquery - toggle(nameClass)
источник

AA

Artush Artush in jQuery — русскоговорящее общество
Данил Васильевич
put your code here http://codepen.io
need to look at him
источник

ДВ

Данил Васильевич in jQuery — русскоговорящее общество
a couple of minutes lll watch
источник

ДВ

Данил Васильевич in jQuery — русскоговорящее общество
you need to change the HTML part to this
<button class="btn3 stop"> Start2</button>
источник

ДВ

Данил Васильевич in jQuery — русскоговорящее общество
and recycled JS code
$(document).ready(function() {
 $(".btn1").click(function() {
   for (let i = 0; i < 10; i++) {
     let z = $("<div></div>");
     z.addClass("d11");

     $(".tbl").append(z);
   }

   // $(".d11").toggleClass()
 });
 $(".btn3").click(function() {
   startDeamon();
 });

 let i = 0;
 $(".btn2").click(function() {
   let x = setInterval(function() {
     $(".inp1").val(i++ + 1);
     $(".inp2").val(i++ + 1);
     $(".inp3").val(i++ + 1);
     $(".inp4").val(i++ + 1);
   }, 2000);
 });
});

function startDeamon(state = false) {
 let j = 0;
 let f = 0;
 // $(".d11").toggleClass("stop")
 $(".d11").toggleClass("stop");
 s2 = setInterval(function() {
   if ($(".stop").length > 0) {
     $(".stop")
       .eq(j++)
       .animate({
         top: rand(300),
         left: rand(300)
       });

     if (state == true) {
       j = 0;
     }
   }
   $(".stop")
     .eq(f++)
     .css({ background: randColor() });
 }, 500);
}

function rand(a) {
 return Math.round(Math.random() * a);
}
function randColor() {
 return `rgb(${rand(255)},${rand(255)},${rand(255)})`;
}
источник

AA

Artush Artush in jQuery — русскоговорящее общество
let me try, thank you
источник

ДВ

Данил Васильевич in jQuery — русскоговорящее общество
Artush Artush
let me try, thank you
good luck
источник

РН

Роман НовАГ in jQuery — русскоговорящее общество
привет
источник