What does a space in a jquery selector mean?

前端 未结 3 696
一生所求
一生所求 2020-12-05 10:14

I ran into a reaction I couldn\'t explain today while working with some very basic Jquery today and I was hoping one of you could explain to me what is occurring to lead to

3条回答
  •  无人及你
    2020-12-05 10:57

    $('div.ObjectContainer').find('div.Object :last') results in a wild card effect. it looks for any child with the psudo class of :last. Thus it simply picked div:last. It's equivalent to $('div.ObjectContainer').find('div.Object div:last')

提交回复
热议问题