What does a space in a jquery selector mean?

前端 未结 3 697
一生所求
一生所求 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 11:02

    Using jQuery, you can find any DOM obj by providing it's ID, class name, tag type, etc or just find the parent first then specify the nested child you want

    For example, you can find the first Div. Object by this query

    $('.ObjectContainer .Object:first')
    

    So the space in jQuery selector separates the parent node and it's children

提交回复
热议问题