1

I have something like this:

$(myElement).siblings()[0].height()

And I cannot get it to work. .siblings()[0] returns pure html instead of a jquery object. How to map it to jquery again, so that I can use .height() property on it?

1
  • 1
    $(myElement).siblings().first().height() Commented May 28, 2013 at 16:56

2 Answers 2

3

You want:

$(myElement).siblings().eq(0).height()

Or using .first()

Sign up to request clarification or add additional context in comments.

Comments

1

You can use:

$(myElement).siblings().first().height()

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.