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

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -