ssitvit / Code-Canvas

A hub for innovation through web development projects
https://codecanvas.ieeessitvit.com/
MIT License
80 stars 127 forks source link

Lazy loading is added #450

Open shraddha761 opened 1 year ago

shraddha761 commented 1 year ago

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

netlify[bot] commented 1 year ago

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.

shraddha761 commented 1 year ago

@Dharmesh177 please review

Dharmesh177 commented 1 year ago

Add video of demonstration and screenshots for assess

shraddha761 commented 1 year ago

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 commented 1 year ago

@Dharmesh177 please review my pr

Dharmesh177 commented 1 year ago

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

Dharmesh177 commented 1 year ago

or need improvement

shraddha761 commented 1 year ago

Is there any improvement needed

cleveranu commented 1 year ago

Kindly resolve conflicts and work on latest branch

shraddha761 commented 1 year ago

@cleveranu I have resolve the conflict please review now