Which way is better: $('#item1 img[src]').qtip( {..}); -OR- $('#item1').qtip( {..}); ?
It works both ways. Would you recommend to use img[src] as a part of the selector? Is it normal?
Thank you.
Which way is better: $(‘#item1 img[src]’).qtip( {..}); -OR- $(‘#item1’).qtip( {..}); ? It works both
Share
Those are two separate things:
Selects an image element within an element with id
item1.Selects an element with id
item1.Also
What does
img[src]do?I only know that format when adding a src to it. Otherwise it does just nothing if it works.