Search code examples
jsfiddlesymbols

I cannot attribute meaning to symbol ">" in jsFiddle code


I encounter the following code in jsFiddle:

$("#start").click(function()
     $("#bg > 
img").addclass('animate');
));

What is meaning of > in the second code line?


Solution

  • Is a css selector.

    > is the child combinator and selects immediate children.

    In your example the imgs that are direct descendants (immediate children) of element with id="bg" will be selected.