테스트 사이트 - 개발 중인 베타 버전입니다

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

제작관리홍보까지
· 2년 전 · 872 · 2

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 소스가 복잡하거나

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

화면전환시 화면이 끊길때

 

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

 

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

 

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 2개

2년 전
감사합니다
2년 전
출처 적어 놓으면 되나요? 상업용은 아니고요, 개인 사이트에 쓰고 싶어서요

게시글 목록

번호 제목
3810
3809
3808
3806
3805
3804
3799
3798
3796
3795
3794
3790
3784
3779
3776
3775
3774
3767
3765
3761
3752
3748
3734
3730
3723
3719
3706
3686
3656
3655