Skip to content

Can't fire a click event #16

Description

@athamzaabdullah

I am using a gallery library called light gallery and I need to fire a click event on the mobilemenu item:
here is the html:

   <div class="wrapper hidden row2">
        <nav id="mainav" class="clear">
            <!-- ################################################################################################ -->
            <ul class="clear">
                <div itemscope itemprop="breadcrumb" itemtype="http://schema.org/BreadcrumbList">
                    <li class="active" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="https://www.aljazeerabros.com" hreflang="ar"><span itemprop="name">الرئيسية</span></a>
                        <meta itemprop="position" content="1" />
                    </li>
                    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="services.html" hreflang="ar"><span itemprop="name">خدمات</span></a>
                        <meta itemprop="position" content="2" />
                    </li>
                    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="branch.html" hreflang="ar"><span itemprop="name">مراكز الخدمة</span></a>
                        <meta itemprop="position" content="3" />
                    </li>
                    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="market.html" hreflang="ar"><span itemprop="name">سوق العملة</span></a>
                        <meta itemprop="position" content="4" />
                    </li>
                    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="#" class="gallery" hreflang="ar"><span itemprop="name">الاستديو</span></a>
                        <meta itemprop="position" content="5" />
                    </li>
                    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="beagent/index.html" target="_blank" hreflang="ar"><span itemprop="name">كن وكيلا</span></a>
                        <meta itemprop="position" content="6" />
                    </li>
                </div>
            </ul>
            <!-- ################################################################################################ -->
        </nav>
    </div>

the JavaScript:

$('.gallery').on('click', function(e) {
    e.preventDefault();
    $(this).lightGallery({
        dynamic: true,
        mode: 'lg-zoom-out-in',
        hideBarsDelay: 3000,
        fourceAutoplay: true,
        pause: 6000,
        facebookDropdownText: 'فيس بوك',
        twitterDropdownText: 'تويتر',
        googlePlusDropdownText: 'جوجل بلس',
        pinterestDropdownText: 'بين ترست',
        fullScreen: true,
        autoplay: true,
        pager: true,
        zoom: true,
        dynamicEl: [{
            "src": 'layout/scripts/gallery/images/1.jpg',
            'thumb': 'layout/scripts/gallery/images/thumbs/1.jpg',
            'subHtml': '<h3>شركة الجزيرة إخوان للصرافة</h3><p>شركة الجزيرة إخوان للصرافة شركة الجزيرة إخوان للصرافة شركة الجزيرة إخوان للصرافة</p>'
        }, {
            'src': 'layout/scripts/gallery/images/2.jpg',
            'thumb': 'layout/scripts/gallery/images/thumbs/2.jpg',
            'subHtml': '<h3>شركة الجزيرة إخوان للصرافة</h3><p>شركة الجزيرة إخوان للصرافة شركة الجزيرة إخوان للصرافة شركة الجزيرة إخوان للصرافة</p>'
        }, {
            'src': 'layout/scripts/gallery/images/3.jpg',
            'thumb': 'layout/scripts/gallery/images/thumbs/3.jpg',
            'subHtml': '<h3>شركة الجزيرة إخوان للصرافة</h3><p>شركة الجزيرة إخوان للصرافة شركة الجزيرة إخوان للصرافة شركة الجزيرة إخوان للصرافة</p>'
        }]
    })

});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions