简体   繁体   中英

Html element to jQuery element

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?

You want:

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

Or using .first()

您可以使用:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM