Determine which element comes first in the HTML/DOM?

I need to determine which element comes first in my markup, such as an ```input``` or ```select```. For example In this case, the ```input``` comes first in the DOM whereas in this case, ```select``` comes first. Any way to do this using jQuery? Thanks EDIT: Just to clarify, I don't want the very first element, I ONLY want to know if between the input and select element, which comes first. There could be other elements before the ```select``` and ```input``` elements.

以上就是Determine which element comes first in the HTML/DOM?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准