Code-Canvas icon indicating copy to clipboard operation
Code-Canvas copied to clipboard

Lazy loading is added

Open shraddha761 opened this issue 2 years ago • 10 comments

Related Issue

Closes #435

In this code, I added the class "lazy" to the elements to lazy load and specified the URL of the lazy content using the data-src attribute. The script will make an AJAX request to fetch the content from the provided URL and set it as the innerHTML of the lazy element.

Additionally, the code adds a scroll event listener to trigger the lazy loading when the elements come into the viewport. The lazy elements that are already visible on page load will be loaded immediately, while the remaining elements will be loaded as the user scrolls.

Checklist

  • [x] My code adheres to the established style guidelines of the project.
  • [x] I have included comments in areas that may be difficult to understand.
  • [x] My changes have not introduced any new warnings.
  • [x] I have conducted a self-review of my code.

shraddha761 avatar Jul 01 '23 09:07 shraddha761

Deploy Preview for joyful-otter-a57da4 ready!

Name Link
Latest commit 47b6ceb9dfa0921a1c01d4f36d703c89bf3f8b43
Latest deploy log https://app.netlify.com/sites/joyful-otter-a57da4/deploys/64d30fa6ddddb20008e03b38
Deploy Preview https://deploy-preview-450--joyful-otter-a57da4.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jul 01 '23 09:07 netlify[bot]

@Dharmesh177 please review

shraddha761 avatar Jul 01 '23 09:07 shraddha761

Add video of demonstration and screenshots for assess

Dharmesh177 avatar Jul 01 '23 15:07 Dharmesh177

Add video of demonstration and screenshots for assess

You will see difference will website load it is more efficient after lazy loading is enabled

shraddha761 avatar Jul 01 '23 16:07 shraddha761

@Dharmesh177 please review my pr

shraddha761 avatar Jul 03 '23 06:07 shraddha761

It taking too much load I guess now no need of this

Dharmesh177 avatar Jul 03 '23 08:07 Dharmesh177

or need improvement

Dharmesh177 avatar Jul 03 '23 08:07 Dharmesh177

Is there any improvement needed

shraddha761 avatar Jul 03 '23 08:07 shraddha761

Kindly resolve conflicts and work on latest branch

cleveranu avatar Aug 09 '23 03:08 cleveranu

@cleveranu I have resolve the conflict please review now

shraddha761 avatar Aug 09 '23 04:08 shraddha761