The page has a menu with buttons, when clicked, content from php files should be loaded and inserted into the corresponding divs. The page is static, without CMS. Tell me which of the 2 options described in the title is best suited for this? What is the difference between them?
content from php files should be loaded and inserted into the appropriate divs
This is practically a description of how the
.load function works.
Therefore, in this case, it is worth using it.
To do this, you need to specify the desired selector separated by a space in the
The above code will only insert the content of the element with id=element and not all the loaded markup.