0

How can I get the adjacent sibling of a dynamic selector?

This is what I have but it is not working.

var titles = $('a.highlight');
        titles.click(function(){
                $(this + " + object.hidden").show("slow");
                return false;
            }
        );

1 Answer 1

1
var titles = $('a.highlight');
titles.click(function(){
    $(this).siblings('.hidden').show("slow");
    return false;
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.