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

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

제작관리홍보까지
· 2년 전 · 873 · 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년 전
출처 적어 놓으면 되나요? 상업용은 아니고요, 개인 사이트에 쓰고 싶어서요

게시글 목록

번호 제목
3530
3529
3497
3472
3471
3451
3442
3441
3437
3436
3425
3421
3420
3405
3402
3399
3397
3394
3393
3392
3391
3390
3389
3388
3387
3386
3385
3384
3383
3382