Documents

Title
fancyBox #1. basic image lightbox
Description
fancyBox is jQuery lightbox plugin.
Here, basic image lightbox setting of fancyBox are posted.
Category
Lightbox
Library
fancyBox
jQuery
Include Files
<!-- Add jQuery and fancyBox -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.2.5/jquery.fancybox.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.2.5/jquery.fancybox.js"></script>
Basic markup

        <script>
            $(function () {
                $(".gallery").fancybox({
                    option
                });
            });
        </script>
        <a href="image.jpg" class="gallery" data-fancybox data-caption="My caption">
	        <img src="thumbnail.jpg" alt="" />
        </a>    
    
Attachment Table

fancyBox Options

PropertyTypeDefaultDescription
loopBooleanfalseEnable infinite gallery navigation
marginArray[44, 0]Space around image, ignored if zoomed-in or viewport width is smaller than 800px
gutterNumber50Horizontal space between slides
keyboardBooleantrueEnable keyboard navigation
arrowsBooleantrueShould display navigation arrows at the screen edges
infobarBooleantrueShould display infobar (counter and arrows at the top)
toolbarBooleantrueShould display toolbar (buttons at the top)
buttonsArray[
  'slideShow',
  'fullScreen',
  'thumbs',
  'share',
  //'download',
  //'zoom',
  'close'
]
What buttons should appear in the top right corner.
Buttons will be created using templates from `btnTpl` option and they will be placed into toolbar (class="fancybox-toolbar"` element)
idleTimeNumber3Detect "idle" time in seconds
smallBtnString'auto'Should display buttons at top right corner of the content
If 'auto' - they will be created for content having type 'html', 'inline' or 'ajax'
Use template from `btnTpl.smallBtn` for customization
protectBooleanfalseDisable right-click and use simple image protection for images
modalBooleanfalseShortcut to make content "modal" - disable keyboard navigtion, hide buttons, etc
image
  └preloadString'auto'Wait for images to load before displaying
Requires predefined image dimensions
If 'auto' - will zoom in thumbnail if 'width' and 'height' attributes are found
ajax
  └settingsObject containing settings for ajax request
      └dataThis helps to indicate that request comes from the modal
Feel free to change naming
          └fancyboxBooleantrue
iframe
  └tplString'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allowtransparency="true" src=""></iframe>'Iframe template
  └preloadBooleantruePreload iframe before displaying it
This allows to calculate iframe content width and height
(note: Due to "Same Origin Policy", you can't get cross domain data).
  └cssCSS{}Custom CSS styling for iframe wrapping element
You can use this to set custom iframe dimensions
  └attrIframe tag attributes
      └scrollingString'auto'
defaultTypeString'image'Default content type if cannot be detected automatically
animationEffectString'zoom'Open/close animation type
false, 'zoom', 'fade', 'zoom-in-out'
animationDurationNumber500Duration in ms for open/close animation
zoomOpacityString'auto'Should image change opacity while zooming
If opacity is "auto", then opacity will be changed if image and thumbnail have different aspect ratios
transitionEffectString'fade'Transition effect between slides
false, 'fade', 'slide', 'circular', 'tube', 'zoom-in-out', 'rotate'
transitionDurationNumber366Duration in ms for transition animation
slideClassString''Custom CSS class for slide element
baseClassString''Custom CSS class for layout
baseTplString'<div class="fancybox-container" role="dialog" tabindex="-1">' +
  '<div class="fancybox-bg"></div>' +
  '<div class="fancybox-inner">' +
    '<div class="fancybox-infobar">' +
      '<span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span>' +
    '</div>' +
    '<div class="fancybox-toolbar">{{buttons}}</div>' +
    '<div class="fancybox-navigation">{{arrows}}</div>' +
    '<div class="fancybox-stage"></div>' +
    '<div class="fancybox-caption-wrap"><div class="fancybox-caption"></div></div>' +
  '</div>' +
'</div>'
Base template for layout
spinnerTplString'<div class="fancybox-loading"></div>'Loading indicator template
errorTplString'<div class="fancybox-error"><p>{{ERROR}}<p></div>'Error message template
btnTpl
  └downloadString'<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}">' +
  '<svg viewBox="0 0 40 40">' +
    '<path d="M20,23 L20,8 L20,23 L13,16 L20,23 L27,16 L20,23 M26,28 L13,28 L27,28 L14,28" />' +
  '</svg>' +
'</a>'
  └zoomString'<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}">' +
  '<svg viewBox="0 0 40 40">' +
    '<path d="M 18,17 m-8,0 a 8,8 0 1,0 16,0 a 8,8 0 1,0 -16,0 M25,23 L31,29 L25,23" />' +
  '</svg>' +
'</button>'
  └closeString'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}">' +
  '<svg viewBox="0 0 40 40">' +
    '<path d="M10,10 L30,30 M30,10 L10,30" />' +
  '</svg>' +
'</button>'
  └smallBtnString'<button data-fancybox-close class="fancybox-close-small" title="{{CLOSE}}"></button>'This small close button will be appended to your html/inline/ajax content by default,
if "smallBtn" option is not set to false
  └arrowLeftString'<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}">' +
  '<svg viewBox="0 0 40 40">' +
    '<path d="M10,20 L30,20 L10,20 L18,28 L10,20 L18,12 L10,20"></path>' +
  '</svg>' +
'</button>'
Arrows
  └arrowRightString'<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}">' +
  '<svg viewBox="0 0 40 40">' +
    '<path d="M30,20 L10,20 L30,20 L22,28 L30,20 L22,12 L30,20"></path>' +
  '</svg>' +
'</button>'
parentElString'body'Container is injected into this element
autoFocusBooleanfalseTry to focus on the first focusable element after opening
backFocusBooleantruePut focus back to active element after closing
trapFocusBooleantrueDo not let user to focus on element outside modal content
fullScreen
  └autoStartBooleanfalse
touchSet 'touch: false' to disable dragging/swiping
  └verticalBooleantrueAllow to drag content vertically
  └momentumBooleantrueContinue movement after releasing mouse/touch when panning
hashStringnullHash value when initializing manually, set `false` to disable hash change
media{}Customize or add new media types
Example:
media : {
  youtube : {
    params : {
      autoplay : 0
    }
  }
}
slideShow
  └autoStartBooleanfalse
  └speedNumber4000
thumbs
  └autoStartBooleanfalseDisplay thumbnails on opening
  └hideOnCloseBooleantrueHide thumbnail grid when closing animation starts
  └parentElString'.fancybox-container'Container is injected into this element
  └axisString'y'Vertical (y) or horizontal (x) scrolling
wheelString'auto'Use mousewheel to navigate gallery
If 'auto' - enabled for images only
onInitfunction$.noopWhen instance has been initialized
beforeLoadfunction$.noopBefore the content of a slide is being loaded
afterLoadfunction$.noopWhen the content of a slide is done loading
beforeShowfunction$.noopBefore open animation starts
afterShowfunction$.noopWhen content is done loading and animating
beforeClosefunction$.noopBefore the instance attempts to close. Return false to cancel the close.
afterClosefunction$.noopAfter instance has been closed
onActivatefunction$.noopWhen instance is brought to front
onDeactivatefunction$.noopWhen other instance has been activated
mobile
  └idleTimeBooleanfalse
  └marginNumber0
  └clickContentfunctionfunction( current, event ) {
  return current.type === 'image' ? 'toggleControls' : false;
}
  └clickSlidefunctionfunction( current, event ) {
  return current.type === 'image' ? 'toggleControls' : 'close';
}
  └dblclickContentfunctionfunction( current, event ) {  return current.type === 'image' ? 'zoom' : false;
}
  └dblclickSlidefunctionfunction( current, event ) {
  return current.type === 'image' ? 'zoom' : false;
}
Related

Source Code

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Add jQuery and fancyBox -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.2.5/jquery.fancybox.css">
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.2.5/jquery.fancybox.js"></script>
    <title>fancyBox #1. basic image lightbox</title>
    <style>
        [class^='gallery-']{
            text-decoration: none;
            transition: .25s;
        }
        [class^='gallery-']:hover{
            opacity: .7;
        }
    </style>
</head>
<body>
    <header>
        <h1 class="dlw-title">fancyBox <small>#1. basic image lightbox</small></h1>
        <p class="dlw-description">fancyBox is jQuery lightbox plugin.<br>
            Here, basic image lightbox setting of fancyBox are posted.</p>
    </header>
    <section>
        <h2 class="dlw-subtitle">[1] Single Image</h2>
        <p>Add data-fancybox in <tag>&lt;a&gt;</tag> tag and generate fancybox.</p>
        <script>
            $(function () {
                $(".gallery-1").fancybox();
            });
        </script>
        <a href="images/photo01.jpg" class="gallery-1" data-fancybox data-caption="Look at the keyboard placed on the desk from the side.">
            <img src="images/photo01-t.jpg" />
        </a>
        <a href="images/photo02.jpg" class="gallery-1" data-fancybox data-caption="Dark coffee and notepad.">
            <img src="images/photo02-t.jpg" />
        </a>
        <a href="images/photo03.jpg" class="gallery-1" data-fancybox data-caption="Around the desk unified with white.">
            <img src="images/photo03-t.jpg" />
        </a>
        <a href="images/photo04.jpg" class="gallery-1" data-fancybox data-caption="Watch keyboard and mouse closely.">
            <img src="images/photo04-t.jpg" />
        </a>
        <a href="images/photo05.jpg" class="gallery-1" data-fancybox data-caption="Focus on the mouse.">
            <img src="images/photo05-t.jpg" />
        </a>
        <a href="images/photo06.jpg" class="gallery-1" data-fancybox data-caption="Work is completed with dual monitor.">
            <img src="images/photo06-t.jpg" />
        </a>
        <a href="images/photo07.jpg" class="gallery-1" data-fancybox data-caption="Writing the manuscript based on the memo.">
            <img src="images/photo07-t.jpg" />
        </a>
        <a href="images/photo08.jpg" class="gallery-1" data-fancybox data-caption="I am not working overtime.">
            <img src="images/photo08-t.jpg" />
        </a>
        <a href="images/photo09.jpg" class="gallery-1" data-fancybox data-caption="Watch the desktop from directly above.">
            <img src="images/photo09-t.jpg" />
        </a>
        <a href="images/photo10.jpg" class="gallery-1" data-fancybox data-caption="Always put coffee next to the computer.">
            <img src="images/photo10-t.jpg" />
        </a>            
    </section>
    <section>
        <h2 class="dlw-subtitle">[2] Group Image Gallery </h2>
        <p>Add the group name in data-fancybox's value, multiple images are showed as a group.</p>
        <script>
            $(function () {
                $(".gallery-2").fancybox();
            });
        </script>
        <a href="images/photo01.jpg" class="gallery-2" data-fancybox="group-2" data-caption="Look at the keyboard placed on the desk from the side.">
            <img src="images/photo01-t.jpg" />
        </a>
        <a href="images/photo02.jpg" class="gallery-2" data-fancybox="group-2" data-caption="Dark coffee and notepad.">
            <img src="images/photo02-t.jpg" />
        </a>
        <a href="images/photo03.jpg" class="gallery-2" data-fancybox="group-2" data-caption="Around the desk unified with white.">
            <img src="images/photo03-t.jpg" />
        </a>
        <a href="images/photo04.jpg" class="gallery-2" data-fancybox="group-2" data-caption="Watch keyboard and mouse closely.">
            <img src="images/photo04-t.jpg" />
        </a>
        <a href="images/photo05.jpg" class="gallery-2" data-fancybox="group-2" data-caption="Focus on the mouse.">
            <img src="images/photo05-t.jpg" />
        </a>
        <a href="images/photo06.jpg" class="gallery-2" data-fancybox="group-2" data-caption="Work is completed with dual monitor.">
            <img src="images/photo06-t.jpg" />
        </a>
        <a href="images/photo07.jpg" class="gallery-2" data-fancybox="group-2" data-caption="Writing the manuscript based on the memo.">
            <img src="images/photo07-t.jpg" />
        </a>
        <a href="images/photo08.jpg" class="gallery-2" data-fancybox="group-2" data-caption="I am not working overtime.">
            <img src="images/photo08-t.jpg" />
        </a>
        <a href="images/photo09.jpg" class="gallery-2" data-fancybox="group-2" data-caption="Watch the desktop from directly above.">
            <img src="images/photo09-t.jpg" />
        </a>
        <a href="images/photo10.jpg" class="gallery-2" data-fancybox="group-2" data-caption="Always put coffee next to the computer.">
            <img src="images/photo10-t.jpg" />
        </a>            
    </section>    
    <section>
        <h2 class="dlw-subtitle">[3] Responsive Image </h2>
            <p>It is possible to change the image to be displayed according to the screen size using the data-srcset attribute. (<a href="https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images" target="_blank">Reference</a>)</p>
        <script>
            $(function () {
                $(".gallery-3").fancybox();
            });
        </script>
        <!-- Add data-srcset="large-image-path large-image-size, medium-image-path medium-image-size, small-image-path small-image-size" -->
        <a href="images/photo01.jpg" class="gallery-3" data-fancybox="group-3" data-srcset="images/photo01-l.jpg 1280w, images/photo01-m.jpg 640w, images/photo01-s.jpg 320w" data-caption="Look at the keyboard placed on the desk from the side.">
            <img src="images/photo01-t.jpg" />
        </a>
        <a href="images/photo02.jpg" class="gallery-3" data-fancybox="group-3" data-srcset="images/photo02-l.jpg 1280w, images/photo02-m.jpg 640w, images/photo02-s.jpg 320w" data-caption="Dark coffee and notepad.">
            <img src="images/photo02-t.jpg" />
        </a>
        <a href="images/photo03.jpg" class="gallery-3" data-fancybox="group-3" data-srcset="images/photo03-l.jpg 1280w, images/photo03-m.jpg 640w, images/photo03-s.jpg 320w" data-caption="Around the desk unified with white.">
            <img src="images/photo03-t.jpg" />
        </a>
        <a href="images/photo04.jpg" class="gallery-3" data-fancybox="group-3" data-srcset="images/photo04-l.jpg 1280w, images/photo04-m.jpg 640w, images/photo04-s.jpg 320w" data-caption="Watch keyboard and mouse closely.">
            <img src="images/photo04-t.jpg" />
        </a>
        <a href="images/photo05.jpg" class="gallery-3" data-fancybox="group-3" data-srcset="images/photo05-l.jpg 1280w, images/photo05-m.jpg 640w, images/photo05-s.jpg 320w" data-caption="Focus on the mouse.">
            <img src="images/photo05-t.jpg" />
        </a>
        <a href="images/photo06.jpg" class="gallery-3" data-fancybox="group-3" data-srcset="images/photo06-l.jpg 1280w, images/photo06-m.jpg 640w, images/photo06-s.jpg 320w" data-caption="Work is completed with dual monitor.">
            <img src="images/photo06-t.jpg" />
        </a>
        <a href="images/photo07.jpg" class="gallery-3" data-fancybox="group-3" data-srcset="images/photo07-l.jpg 1280w, images/photo07-m.jpg 640w, images/photo07-s.jpg 320w" data-caption="Writing the manuscript based on the memo.">
            <img src="images/photo07-t.jpg" />
        </a>
        <a href="images/photo08.jpg" class="gallery-3" data-fancybox="group-3" data-srcset="images/photo08-l.jpg 1280w, images/photo08-m.jpg 640w, images/photo08-s.jpg 320w" data-caption="I am not working overtime.">
            <img src="images/photo08-t.jpg" />
        </a>
        <a href="images/photo09.jpg" class="gallery-3" data-fancybox="group-3" data-srcset="images/photo09-l.jpg 1280w, images/photo09-m.jpg 640w, images/photo09-s.jpg 320w" data-caption="Watch the desktop from directly above.">
            <img src="images/photo09-t.jpg" />
        </a>
        <a href="images/photo10.jpg" class="gallery-3" data-fancybox="group-3" data-srcset="images/photo10-l.jpg 1280w, images/photo10-m.jpg 640w, images/photo10-s.jpg 320w" data-caption="Always put coffee next to the computer.">
            <img src="images/photo10-t.jpg" />
        </a>                    
    </section>  
    <section>
        <h2 class="dlw-subtitle">[4] Button Option </h2>
        <p>Setting of button in the lightbox.</p>
        <script>
            $(function () {
                $(".gallery-4").fancybox({
                    buttons : [
                        // Default
                        'slideShow',
                        'fullScreen',
                        'thumbs',
                        'share',
                        'close',
                        // Activation
                        'download',
                        'zoom'                        
                    ]                  
                });
            });
        </script>        
        <a href="images/photo01.jpg" class="gallery-4" data-fancybox="group-4" data-caption="Look at the keyboard placed on the desk from the side.">
            <img src="images/photo01-t.jpg" />
        </a>
        <a href="images/photo02.jpg" class="gallery-4" data-fancybox="group-4" data-caption="Dark coffee and notepad.">
            <img src="images/photo02-t.jpg" />
        </a>
        <a href="images/photo03.jpg" class="gallery-4" data-fancybox="group-4" data-caption="Around the desk unified with white.">
            <img src="images/photo03-t.jpg" />
        </a>
        <a href="images/photo04.jpg" class="gallery-4" data-fancybox="group-4" data-caption="Watch keyboard and mouse closely.">
            <img src="images/photo04-t.jpg" />
        </a>
        <a href="images/photo05.jpg" class="gallery-4" data-fancybox="group-4" data-caption="Focus on the mouse.">
            <img src="images/photo05-t.jpg" />
        </a>
        <a href="images/photo06.jpg" class="gallery-4" data-fancybox="group-4" data-caption="Work is completed with dual monitor.">
            <img src="images/photo06-t.jpg" />
        </a>
        <a href="images/photo07.jpg" class="gallery-4" data-fancybox="group-4" data-caption="Writing the manuscript based on the memo.">
            <img src="images/photo07-t.jpg" />
        </a>
        <a href="images/photo08.jpg" class="gallery-4" data-fancybox="group-4" data-caption="I am not working overtime.">
            <img src="images/photo08-t.jpg" />
        </a>
        <a href="images/photo09.jpg" class="gallery-4" data-fancybox="group-4" data-caption="Watch the desktop from directly above.">
            <img src="images/photo09-t.jpg" />
        </a>
        <a href="images/photo10.jpg" class="gallery-4" data-fancybox="group-4" data-caption="Always put coffee next to the computer.">
            <img src="images/photo10-t.jpg" />
        </a>            
    </section>  
    <section>
        <h2 class="dlw-subtitle">[5] Image Protection </h2>
        <p>Disable right-click and use simple image protection for images.</p>
        <script>
            $(function () {
                $(".gallery-5").fancybox({
                    // Default: false
                    protect : true                  
                });
            });
        </script>        
        <a href="images/photo01.jpg" class="gallery-5" data-fancybox="group-5" data-caption="Look at the keyboard placed on the desk from the side.">
            <img src="images/photo01-t.jpg" />
        </a>
        <a href="images/photo02.jpg" class="gallery-5" data-fancybox="group-5" data-caption="Dark coffee and notepad.">
            <img src="images/photo02-t.jpg" />
        </a>
        <a href="images/photo03.jpg" class="gallery-5" data-fancybox="group-5" data-caption="Around the desk unified with white.">
            <img src="images/photo03-t.jpg" />
        </a>
        <a href="images/photo04.jpg" class="gallery-5" data-fancybox="group-5" data-caption="Watch keyboard and mouse closely.">
            <img src="images/photo04-t.jpg" />
        </a>
        <a href="images/photo05.jpg" class="gallery-5" data-fancybox="group-5" data-caption="Focus on the mouse.">
            <img src="images/photo05-t.jpg" />
        </a>
        <a href="images/photo06.jpg" class="gallery-5" data-fancybox="group-5" data-caption="Work is completed with dual monitor.">
            <img src="images/photo06-t.jpg" />
        </a>
        <a href="images/photo07.jpg" class="gallery-5" data-fancybox="group-5" data-caption="Writing the manuscript based on the memo.">
            <img src="images/photo07-t.jpg" />
        </a>
        <a href="images/photo08.jpg" class="gallery-5" data-fancybox="group-5" data-caption="I am not working overtime.">
            <img src="images/photo08-t.jpg" />
        </a>
        <a href="images/photo09.jpg" class="gallery-5" data-fancybox="group-5" data-caption="Watch the desktop from directly above.">
            <img src="images/photo09-t.jpg" />
        </a>
        <a href="images/photo10.jpg" class="gallery-5" data-fancybox="group-5" data-caption="Always put coffee next to the computer.">
            <img src="images/photo10-t.jpg" />
        </a>            
    </section>     
    <section>
        <h2 class="dlw-subtitle">[6] Animation Type & Transition Effect </h2>
        <p>Change thumbnail click animation and transition effect.</p>
        <script>
            $(function () {
                $(".gallery-6").fancybox({
                    // Default » "zoom"
                    animationEffect: "zoom-in-out",
                    // Default » "fade"
                    transitionEffect: "tube"
                });
            });
        </script>        
        <a href="images/photo01.jpg" class="gallery-6" data-fancybox="group-6" data-caption="Look at the keyboard placed on the desk from the side.">
            <img src="images/photo01-t.jpg" />
        </a>
        <a href="images/photo02.jpg" class="gallery-6" data-fancybox="group-6" data-caption="Dark coffee and notepad.">
            <img src="images/photo02-t.jpg" />
        </a>
        <a href="images/photo03.jpg" class="gallery-6" data-fancybox="group-6" data-caption="Around the desk unified with white.">
            <img src="images/photo03-t.jpg" />
        </a>
        <a href="images/photo04.jpg" class="gallery-6" data-fancybox="group-6" data-caption="Watch keyboard and mouse closely.">
            <img src="images/photo04-t.jpg" />
        </a>
        <a href="images/photo05.jpg" class="gallery-6" data-fancybox="group-6" data-caption="Focus on the mouse.">
            <img src="images/photo05-t.jpg" />
        </a>
        <a href="images/photo06.jpg" class="gallery-6" data-fancybox="group-6" data-caption="Work is completed with dual monitor.">
            <img src="images/photo06-t.jpg" />
        </a>
        <a href="images/photo07.jpg" class="gallery-6" data-fancybox="group-6" data-caption="Writing the manuscript based on the memo.">
            <img src="images/photo07-t.jpg" />
        </a>
        <a href="images/photo08.jpg" class="gallery-6" data-fancybox="group-6" data-caption="I am not working overtime.">
            <img src="images/photo08-t.jpg" />
        </a>
        <a href="images/photo09.jpg" class="gallery-6" data-fancybox="group-6" data-caption="Watch the desktop from directly above.">
            <img src="images/photo09-t.jpg" />
        </a>
        <a href="images/photo10.jpg" class="gallery-6" data-fancybox="group-6" data-caption="Always put coffee next to the computer.">
            <img src="images/photo10-t.jpg" />
        </a>            
    </section>                
</body>
</html>

Comment

Search

Style Design
Text Style DesignCSS

Here, design samples of various effects to text are posted.

Headline (Heading) Style DesignCSS

The headline is the text indicating the nature of the article below it.
Here, design samples of headline using style sheets are posted.

OL (Ordered List) Style DesignCSS

The HTML <ol> element represents an ordered list of items.
Here, design samples of ol using style sheets are posted.

HR (Separator Line) Style DesignCSS

The HTML <hr> element represents a thematic break between paragraph-level elements.
Here, design samples of hr using style sheets are posted.

Box Shadow Style DesignCSS

The box-shadow CSS property is used to add shadow effects around an element's frame.
Here, design samples of box-shadow property using style sheets are posted.

Layout
How to specify a breakpoint and switch imagesJS

Using <picture> and srcset, it is a method of switching images according to screen size. It also corresponds to retina.
In this example, Picturefill is added for IE.

Grid LayoutCSS

Grid is the value of the CSS display property.
Here, layout samples of grid property are posted.

FlexCSS

Flex is the value of the CSS display property.

Link & Button
Bootstrap ButtonCSS

It is a standard button design of Bootstrap Framework.

Hover.cssCSS

Hover.css is a style-sheet collection of hover effects.

Button.cssCSS

Button.css is collection of CSS3 button animations.

Card
Bootstrap CardCSS

It is a standard Card design of Bootstrap Framework.

Text
Arctext.jsjQuery

Arctext.js is a jQuery plugin that causes a string to curve along a specified circle radius.

Lettering.jsjQuery

Lettering.js is a jQuery plugin that encloses a specified character string with one character, one word, one column by <span> tag.

Textillate.jsjQuery

Textillate.js is a jQuery plugin that adds In / Out animation effects to text.

FitText.jsjQuery

FitText.js is jQuery plugin that fits the font size according to the width of the parent element.

Media
FeedEkjQuery

FeedEk is a jQuery plugin that parses RSS and Atom feeds and displays them.

YouTube Embed

Introduction of various embedment methods of YouTube.

FitVids.jsjQuery

FitVids is a jQuery plug-in that converts YouTube videos embedded with iframe into responsive.

xZoomjQuery

xZoom is a jQuery plug-in that shows a zoom preview of the image.
It is possible to customize the preview position and zoom.

Instagram.cssCSS

Instagram.css is a stylesheet set that filters photos like instagram.

Date
Moment.jsJS

Moment.js is a javascript that processes and displays date and time.

Bootstrap Material DatePickerjQuery

Bootstrap Material DatePicker is jQuery data picker plugin using Moment.js.

Table
MultifilterjQuery

Multifilter is jQuery Table Filtering Plugin.

Flex TableCSS

Responsive table using "display: flex;".
Not supported for rowspan.

Grid TableCSS

Responsive table using "display: grid;".
Not supported for rowspan.

Bootstrap TableCSS

It is a standard Table design of Bootstrap Framework.

Form
jQuery Mask PluginjQuery

jQuery Mask Plugin is jQuery plugin that make mask (validation) on form field.

Select2 #1. Basic SettingjQuery

Select2 is a jquery plugin that makes select form more advanced.
Here is the basic usage of Select2.

jQuery SearcherjQuery

jQuery Searcher is jQuery search/filtering plugin that supports various markups.

Slider
Bootstrap CarouseljQuery

It is a standard Carousel of Bootstrap Framework.

FlexSlider #1. Single SliderjQuery

FlexSlider is responsive jQuery slider plugin.
Here, basic single slider setting of Flexslider are posted.

FlexSlider #2. Carousel SliderjQuery

FlexSlider is responsive jQuery slider plugin.
Here, basic carousel slider setting of Flexslider are posted.

slick #1. Single SliderjQuery

slick is responsive jQuery slider plugin.
Here, basic single slider setting of slick are posted.

slick #2. Carousel SliderjQuery

slick is responsive jQuery slider plugin.
Here, carousel slider setting of slick are posted.

Lightbox
fancyBox #1. basic image lightboxjQuery

fancyBox is jQuery lightbox plugin.
Here, basic image lightbox setting of fancyBox are posted.

fancyBox #2. media lightboxjQuery

fancyBox is jQuery lightbox plugin.
Here, YouTube, Vimeo, Instagram, Google Maps, inline HTML, iframe lightbox setting of fancyBox are posted.

Magnific Popup #1. basic image lightboxjQuery

Magnific Popup is jQuery lightbox plugin.
Here, basic image lightbox setting of Magnific Popup are posted.

Magnific Popup #2. media lightboxjQuery

Magnific Popup is jQuery lightbox plugin.
Here, YouTube, Vimeo, Google Maps, inline HTML lightbox setting of Magnific Popup are posted.

Magnific Popup #3. CSS3-based animation effectsjQuery

Since Magnific Popup does not incorporate animation effects by standard, you need to set it yourself.
Here we summarize the CSS3-based animation settings.

Navigation
animsitionjQuery

animsition is a jQuery plugin that adds an in/out animation effect at the time of page transition.

GreedyNavjQuery

GreedyNav is a responsive navigation menu using jQuery which switches over the items that protruded when the screen was scaled down to dropdown.

GridTabjQuery

GridTab is a lightweight jQuery plugin to create grid based responsive tabs.

jQuery.NiceScrolljQuery

jQuery.NiceScroll is a jQuery plugin that extends scroll display and functions.

metisMenujQuery

metisMenu is a jQuery plugin that expands vertical and vertical menus.

fullPage.js #1. basic fullscreen scrollingjQuery

fullPage.js is jQuery Fullscreen Scrolling plugin.
Here, basic fullscreen scrolling of fullPage.js are posted.

fullPage.js #2. fullscreen scrolling with menujQuery

fullPage.js is jQuery Fullscreen Scrolling plugin.
Here, navigation menu is displayed..

Offside.js #1. Basic Off-canvasJS

Offside.js is a JavaScript kit that expands off-canvas.
This is a sample where the left side off-canvas expands.

Offside.js #2. Multiple Off-canvasJS

Offside.js is a JavaScript kit that expands off-canvas.
This is a sample that expands multiple off-canvases.

Filterizr #1. Basic FilteringjQuery

Filterizr is a jQuery plugin that sorts, shuffles, searches for the items in the container.
This is a basic sample without setting options.

Filterizr #2. Advanced FilteringjQuery

Filterizr is a jQuery plugin that sorts, shuffles, searches for the items in the container.
This is a sample of more advanced setting of Filterizr.

Animation
animsitionjQuery

animsition is a jQuery plugin that adds an in/out animation effect at the time of page transition.

Textillate.jsjQuery

Textillate.js is a jQuery plugin that adds In / Out animation effects to text.

ScrollajQuery

Scrolla is jQuery scroll animation plugin.

Hover.cssCSS

Hover.css is a style-sheet collection of hover effects.

Animate.cssCSS

Animate.css is a style-sheet collection of animation effects.

jQuery Easing PluginjQuery

jQuery Easing Plugin is a plugin to extend the easing (animation effect) of jQuery.
The easing of element is posted.

Background
fullPage.js #1. basic fullscreen scrollingjQuery

fullPage.js is jQuery Fullscreen Scrolling plugin.
Here, basic fullscreen scrolling of fullPage.js are posted.

fullPage.js #2. fullscreen scrolling with menujQuery

fullPage.js is jQuery Fullscreen Scrolling plugin.
Here, navigation menu is displayed..

jquery.mb.YTPlayerjQuery

jQuery.mb.YTPlayer is jQuery Background player plugin.

Modal / Tooltip
Hint.cssCSS

Hint.css is a style sheet set for tooltip.
You can display tooltip just by adding class name.

ProtipjQuery

Protip is a jQuery plugin that generates tooltips.
Set the position, size, etc. of the tooltip only with data attribute.

Social
Framework
Bootstrap CarouseljQuery

It is a standard Carousel of Bootstrap Framework.

Bootstrap CardCSS

It is a standard Card design of Bootstrap Framework.

Bootstrap ButtonCSS

It is a standard button design of Bootstrap Framework.

Bootstrap TableCSS

It is a standard Table design of Bootstrap Framework.

Cheat Sheet
HTML5 Cheat Sheet

HTML5 Cheat Sheet by Make A Website Hub

CSS3 Cheat Sheet

CSS3 Cheat Sheet by Smashing Magazine

Visual Studio Code Keyboard Shortcuts

This is the Visual Studio Code default keyboard shortcut list.

GreenSock Cheat Sheet

Cheese sheet of TweenMAX, TweenLite, TimelineLite, TimelineMax by GreenSock.

Other
Google Search

On this page you can search for codes collectively.

Design News

It is a news feed about design.