The plugin loadImg.js contains the following code.Menus Icon Bar Menu Icon Accordion Tabs Vertical Tabs Tab Headers Full Page Tabs Hover Tabs Top Navigation Responsive Topnav Split Navigation Navbar with Icons Search Menu Search Bar Fixed Sidebar Side Navigation Responsive Sidebar Fullscreen Navigation Off-Canvas Menu Hover Sidenav Buttons Sidebar with Icons Horizontal Scroll Menu Vertical Menu Bottom Navigation Responsive Bottom Nav Bottom Border Nav Links Right Aligned Menu Links Centered Menu Link Equal Width Menu Links Fixed Menu Slide Down Bar on Scroll Hide Navbar on Scroll Shrink Navbar on Scroll Sticky Navbar Navbar on Image Hover Dropdowns Click Dropdowns Cascading Dropdown Dropdown in Topnav Dropdown in Sidenav Resp Navbar Dropdown Subnavigation Menu Dropup Mega Menu Mobile Menu Curtain Menu Collapsed Sidebar Collapsed Sidepanel Pagination Breadcrumbs Button Group Vertical Button Group Sticky Social Bar Pill Navigation Responsive Header You can change the ‘img’ to any div or class on which you want to show the spinner while it is loading. The loadImg.js contains the plugin which will automatically detect the images on the page and hides it while the images are not loaded completely.
#Loading icon how to
How to show loading gif while actual image is loading – Very simple method. Let’s learn how to show a loading icon over each image on your site while the image is loading, using jQuery.
Many of you have been searching for a way to show a loading gif while actual image is being loaded or show a spinner gif while an HTML element or div is being loaded.
#Loading icon code
paste this code under the head tag or in a separate js file.Īll done, now reload your page and it will show a loading icon. Now add some jQuery to show the pre-loading icon when the page is loading and hide when it has finished loading.
If it's not present, don't show loader */ * Paste this css to your style sheet file or under head tag */ Add some CSS to show the icon and bring it in the middle of the page. How to show a Responsive loading icon or image while page loads.Ģ.