프로젝트
GitHub에서 보기 1. In the
Take a look at
Wruczek/Bootstrap-Cookie-Alert
소개
A simple, good looking cookie alert built for Bootstrap 3/4. No dependencies required.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalBootstrap-Cookie-Alert
A simple cookie alert for Bootstrap 5 and 4. No dependencies required.
Demo with Bootstrap 5 • Demo with Bootstrap 4
I unfortunately don't remember the source of the cubes pattern :( If someone know, please email me or create an issue. I would love to credit the author.
npm package
npm i bootstrap-cookie-alert
How to use
1. In the head of your document, include cookiealert.css after Bootstrap.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Wruczek/Bootstrap-Cookie-Alert@gh-pages/cookiealert.css">
2. Add the html markup:
<!-- START Bootstrap-Cookie-Alert -->
<div class="alert text-center cookiealert" role="alert">
<b>Do you like cookies?</b> 🍪 We use cookies to ensure you get the best experience on our website. <a href="https://cookiesandyou.com/" target="_blank">Learn more</a>
<button type="button" class="btn btn-primary btn-sm acceptcookies">
I agree
</button>
</div>
<!-- END Bootstrap-Cookie-Alert -->
3. Include the JavaScript after the html markup
<script src="https://cdn.jsdelivr.net/gh/Wruczek/Bootstrap-Cookie-Alert@gh-pages/cookiealert.js"></script>
Take a look at demo-bs5.html for a working example
Accept event
If you need to, you can listen for the cookieAlertAccept event to get notified when the user accepts the cookies.
window.addEventListener("cookieAlertAccept", function() {
alert("cookies accepted")
})
관련 프로젝트 살펴보기
불러오는 중…