Answer the question
In order to leave comments, you need to log in
What is the best way to attach a handler to an element?
There is a navigation, and the elements of this navigation (links) are loaded via the API from the server, an example of how this is implemented:
for (var i = 0; i < links.length; i++) {
var li = document.createElement('li');
li.innerHTML = links[i].name;
$('.nav__content').append(li);
}
Answer the question
In order to leave comments, you need to log in
It doesn't have to be done through docker.
Install multiple versions of php.
In your case, install `php7.0` from the ppa repository:
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.0 php7.0-fpm
# ...
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
# ...
Here it is better to hang the handler on the parent ul.
https://davidwalsh.name/event-delegate
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question