what is the meaning of jQuery selector carry a second parameter? -
When I read the book, I found that I do not understand this
$ ("Span.task-name", $ function) .text (taskName);
work-name
is the class of the term tag
Can anyone help me with that? What is the correct meaning of doing this?
The second parameter is for reference:
this .find ( )
is similar, where it takes a jquery selection and tries to refine it with a new selector. For example, if you type span.span1
to # div1
, you will do so:
$ ("span.span1", "# div1");
It is the same:
$ ("# div1 span.span1");
Between the two, there is actually only a small difference in performance, but there is no difference in performance.
Comments
Post a Comment