Skip to content

Conversation

@Imran-imtiaz48
Copy link
Contributor

Changes made:

  1. Wrapped the code in DOMContentLoaded to ensure it runs after the DOM is fully loaded.
  2. Added a check to ensure left, right, and container elements are present before adding event listeners.
  3. Improved formatting for readability and consistency.

Changes made:
1.	Wrapped the code in DOMContentLoaded to ensure it runs after the DOM is fully loaded.
2.	Added a check to ensure left, right, and container elements are present before adding event listeners.
3.	Improved formatting for readability and consistency.
@tajulafreen
Copy link
Owner

tajulafreen commented Jul 9, 2024

Hi @Imran-imtiaz48,
Thanks for your contributions!

The changes you made are great:

Wrapping the code in DOMContentLoaded ensures the code runs only after the DOM is ready, making it more reliable.

  • Adding the check to ensure the necessary elements exist before adding event listeners prevents potential errors and makes the code more robust.
  • And the improved formatting makes the code much easier to read and understand.
  • It's awesome that you're thinking about these details!

Just one more thing - I'm seeing some linter errors. Could you please address those before I merge the pull request?
Kindly Run this command to solve the error.

npx eslint . --fix

Once those are resolved, I'll be happy to merge them. Thanks again!

@Imran-imtiaz48
Copy link
Contributor Author

To address the linter errors, you can follow these steps:

  1. Ensure you have ESLint installed: If ESLint is not already installed in your project, you can install it by running:
    bash
    Copy code
    npm install eslint --save-dev
  2. Run ESLint with the --fix option: This will automatically fix many of the common linting errors.
    bash
    Copy code
    npx eslint . --fix
    This command will run ESLint on your project and attempt to fix any linting issues it finds.

@tajulafreen tajulafreen merged commit 36f7cf4 into tajulafreen:main Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants