
action-buttons-mobile-toggle.js
About this file
Depending on the size of the window, the JavaScript function adds or removes the attribute "tabs-left" to the action button column, as seen in view_request.html.
Code Issues
-
Needs a comment specifying why is 768 specifically used for
if (width >= 768)
on line 5. - If the value 768 may change in the future, recommend putting 768 in a variable with a meaningful variable name of what the value represents to make the code easier to understand and modify.
-
Why is the
resize
function called twice?resize
is first called with a function as a parameter on line 3, and thenresize
is called again with no parameter on line 11. Needs a comment explaining the reason behind callingresize
twice.
Code Check Report
Documentation drawn from source code
$(window).resize(function () {