lightgallery

Add Class on ready, remove class on mouseenter

与世无争的帅哥 提交于 2019-12-11 07:00:52
问题 I'm creating my portfolio website. I'm looking to add class on document ready, and remove/change that class to a different class on hover. I'm using lightgallery & CSS gram filters to my images on load and hover. Previously, I added a list. Unfortunately it did not work well for my needs. Previous code $("#gallery a").on({ mouseenter : function() { $(this).find(".nak-gallery-poster").removeClass("inkwell").addClass("mayfair"); }, mouseleave : function() { $(this).find(".nak-gallery-poster")

Can we convert JSON Array of Objects to lightGalery Array of Objects?

佐手、 提交于 2019-12-11 06:08:54
问题 Hello all senior web developers, I am newbie for web development. I have used lightGallery plugin to view images. But my image path stored in array. In array element always dynamic that get from ajax response. This is My array : var data = { "result" : [ { "file_name" : "a.jpg" }, { "file_name" : "b.png"}, ...................... ] } // This is Lightgallery array syntax $(this).lightGallery({ dynamic: true, dynamicEl: [{"src": 'your image path'}, {'src': 'your image path'}, ...................

Lightgallery not working

﹥>﹥吖頭↗ 提交于 2019-12-04 12:49:34
问题 having a problem implementing lightgallery with my website. I've searched stack overflow and read the docs on the lightgallery page and can't figure out what the problem is! Here is the code for my site: <!doctype html> <html class="no-js" lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>W3 Alchemy | My Portfolio of Work</title> <link href="stylesheets/normalize.min.css" rel="stylesheet" media="screen"> <link rel=