ABigImage

ABigImage is jQuery plugin for viewing big versions of images.

Features

Sponsored links

Example

First image Second image Third image Fourth image

Usage

Basic

Add jQuery and ABigImage scripts in head of page.

<script src="jquery.js"></script>
<script src="abigimage.jquery.js"></script>

Call plugin on selector of enlargeable images links.

$(function() {
    $('a[href$=".jpg"]').abigimage();
});

Options

Plugin generates next html code:

<!-- overlay -->
<div></div>
<!-- layout -->
<div>
    <!-- prevBtnWrapper (clickable behind the image, width 50%) -->
    <div>
        <!-- prevBtnBox (clickable above the image, button width) -->
        <div>
            <!-- prevBtn -->
            <div><!-- prevBtnHtml --></div>
        </div>
    </div>
    <!-- closeBtnWrapper (clickable behind the image, width 50%) -->
    <div>
        <!-- closeBtnBox (clickable above the image, button width) -->
        <div>
            <!-- closeBtn -->
            <div><!-- closeBtnHtml --></div>
        </div>
    </div>
    <!-- img -->
    <img>
    <!-- imgNext -->
    <img>
    <!-- imgPrev -->
    <img>
    <!-- bottom -->
    <div></div>
</div>

Using onopen handler

Function, defined as onopen handler, executes in context of plugin, and receives target element as argument. Plugin elements available in this context as properties.

$(function() {
    $('a[href$=".jpg"]').abigimage({
        bottomCSS: {
            fontSize: '2em'
        },
        onopen: function (target) {
            this.bottom.html(
                $('img', target).attr('alt')
            );
        }
    });
});

I WANT your comments, feature requests, bug reports, suggestions, thoughts... on GitHub.