Open emilianraduu opened 1 year ago
In order to make the code clearer, the following logic should be kept in mind:
Also, you shouldn't select multiple times the same element. It's wasteful and we should only select it once and reuse it. In the screenshot above it says that the body was selected 4 times and in the one below the body element is selected twice in the same function without a specific reason.
Minimise the renderSection function to be modular like the "detailsPage" javascript file. In order to do that please make the function as small as possible by moving the Search and Hamburger menu login into separate functions. The functions should also be minimal in size and, if its the case, call other functions that render small parts of their children. Also, please name the css classes accordingly so they can be easily identified (no "TEST" classes, no "divElement" js names. make them explicit).