GNUBOARD5에서 SVG 로딩바로 백로딩을 띄우는 코드에요 > 퍼블리셔팁

퍼블리셔팁

퍼블리싱과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.

GNUBOARD5에서 SVG 로딩바로 백로딩을 띄우는 코드에요 정보

기타 GNUBOARD5에서 SVG 로딩바로 백로딩을 띄우는 코드에요

본문

GNUBOARD5에서 SVG 로딩바로 백로딩을 띄우는 코드에요

필요하신분 참조해보세요

 

<div id="content-wrapper"> <!-- Your website content goes here --> </div> <div class="loading-bar-wrapper"> <div class="loading-bar"> <img src="/path/to/loading-bar.svg" alt="Loading..."> </div> </div> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script> $(document).ready(function() { // Add click event listener to backloading link $('#backloading-link').click(function(e) { e.preventDefault(); // Prevent default link behavior // Show loading bar $('.loading-bar-wrapper').show(); // Load content via AJAX $('#content-wrapper').load('/path/to/content', function() { // Hide loading bar after content is loaded $('.loading-bar-wrapper').hide(); }); }); }); </script>

 

백로딩은 

HTML 소스가 복잡하거나

자바스크립트가 맣이 들어가서 

화면전환시 화면이 끊길때

 

데이터를 전부 로드하고 나서 화면을 띄우는 코드입니다

 

필요시 유용하게 쓸수 있겠죠

 

추천
1
  • 복사

댓글 2개

© SIRSOFT
현재 페이지 제일 처음으로