Coder Social home page Coder Social logo

Comments (6)

 avatar commented on July 18, 2024

i haven't used the plugin yet but the documentation says you could use the trigger event to do that...something like this...

$('#button').on('click', function() {
$("img").trigger("unveil");
});

from unveil.

derSteffen avatar derSteffen commented on July 18, 2024

GREAT

Thank you very much!

from unveil.

derSteffen avatar derSteffen commented on July 18, 2024

Thats my Code:
$('.responsive-accordion-head', this).on('click', function() {
$(".responsive-accordion-panel img.lazyload").trigger("unveil");
});
That works, but in this case, all image in all my .responsive-accordion-panel are display, if I click on the head. Is there an opinion that only the images are display in $this .responsive-accordion-panel and not also in all others .responsive-accordion-panel ?

Please, can you help me?

Greetings

from unveil.

ardok avatar ardok commented on July 18, 2024

@derSteffen
Not quite sure what you mean but I believe you should be able to do something like:

$('.responsive-accordion-head', this).on('click', function() {
  $(this).find('.responsive-accordion-panel img.lazyload').trigger("unveil");
});

from unveil.

derSteffen avatar derSteffen commented on July 18, 2024

Thanks! That is it :-)

from unveil.

 avatar commented on July 18, 2024

So, If I have more than one hidden image and I have to show on click. I have to trigger unveil on each and every click?

from unveil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.