Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't fire a click event #16

Open
athamzaabdullah opened this issue Oct 26, 2016 · 0 comments
Open

Can't fire a click event #16

athamzaabdullah opened this issue Oct 26, 2016 · 0 comments

Comments

@athamzaabdullah
Copy link

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>'
        }]
    })

});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant