lightGallery Table

How to use lightgallery with table..

by sachin377

HTML

<script src="http://sachinchoolur.github.io/lightGallery/light-gallery/js/lightGallery.min.js"></script>
<link rel="stylesheet" href="http://sachinchoolur.github.io/lightGallery/light-gallery/css/lightGallery.css">
<table class="lightgallery">
    <tbody>
        <tr>
            <td> <a class="selector" href="#" data-src="http://sachinchoolur.github.io/lightGallery/img/img1.jpg">
                    <img src="http://sachinchoolur.github.io/lightGallery/img/thumb1.jpg" />
                </a> 
            </td>
            <td> <a class="selector" href="#" data-src="http://sachinchoolur.github.io/lightGallery/img/img2.jpg">
                    <img src="http://sachinchoolur.github.io/lightGallery/img/thumb2.jpg" />
                </a> 
            </td>
        </tr>
        <tr>
            <td> <a class="selector" href="#" data-src="http://sachinchoolur.github.io/lightGallery/img/img3.jpg">
                    <img src="http://sachinchoolur.github.io/lightGallery/img/thumb3.jpg" />
                </a> 
            </td>
            <td> <a class="selector" href="#" data-src="http://sachinchoolur.github.io/lightGallery/img/img4.jpg">
                    <img src="http://sachinchoolur.github.io/lightGallery/img/thumb4.jpg" />
                </a> 
            </td>
        </tr>
    </tbody>
</table>

JavaScript

$(document).ready(function () {
    $('.lightgallery').lightGallery({
        selector: '.selector'
    });
});