WordPress.org

Ready to get started?Download WordPress

Forums

jQuery caption anyone? (4 posts)

  1. Maracas1970
    Member
    Posted 2 years ago #

    Anybody know of a WordPress specific plugin that does this

    I have tried it on my site, but all that happens is it seems to select all the images and not just the ones i want it to. I tried mucking about with the classes but it either wouldnt function at all or it just selected all images, i would like to be able to select just the images i want the effect to be applied to.

    Thanks

    Marcus

    [duplicate of http://wordpress.org/support/topic/jquery-hover-caption-plugin-problem-selecting-all-images?replies=1 ]

  2. wpismypuppet
    Member
    Posted 2 years ago #

    Looks to me that you should give those images you want to have this happen to a class... like class="myclass".

    Then using the jQuery example they give in their "How To Make It Work" section, just change the code from this:

    $(document).ready(function() {
       $('img').hover_caption();
    });

    To this:

    $(document).ready(function() {
        $('.myclass').hover_caption();
    });

    You may need to replace any $ with jQuery, depending on your compatibility mode...

  3. Maracas1970
    Member
    Posted 2 years ago #

    Thanks wpismypuppet

    I will go back and try that, i have just used a rollover image solution for now, which if im honest is probably fine anyway.

    But i shall go back and retry your solution in the interest of furthering my WP/jQuery knowledge.

    Thanks again

    Marcus

  4. tessama
    Member
    Posted 2 years ago #

    i used the modification above with some success, but it isn't pulling the title attribution from the image so the rollover is stuck on the default text. i really know very little about js and have somehow managed my way with php, if anyone has any clue what i might need to do to make this work, your help would be greatly appreciated!

Topic Closed

This topic has been closed to new replies.

About this Topic