How to Fire a jQuery Function When the Page is Loaded and Resized

  • read
  • Add to Flipboard Magazine.

When building responsive websites you often want to run a script when the page loads. But when you resize the window the layout breaks. You can use the on method to run your code if the page loads or has been resized.

Source

Bootstrap 4 books - learn responsive web design for beginners

The Bootstrap 4 Quick Start

Learn More

Advertise Here

Written by: Jacob Lett - Jacob is an experienced website designer and developer who specializes in building HubSpot CMS themes. He helps Industrial companies optimize and leverage their website for awareness, lead generation, and branding.
Category: Code Snippets
Tags: ,

Want to Get Email Updates?

Receive a monthly digest of new tutorials and resources.

Bootstrap 4 books - learn responsive web design for beginners

Want a Bootstrap Reference Book?

Learn More

Advertise Here