I have this snippet and I want to know how it works .... I understand keypup, But I do not understand this data ... what it is doing and
are the parts that I do not understand
$ ('p span '). Each (function () {$ (this) .data ('factor', $ (this) .text ());}) and
$ ('P span') .each (function () {$ (this) .text (function () {return $ (this) .data ('factor') * factor;});}) Looks like they are looping but
jQuery function data In the first block, in the first block, you are looping through spans, and each one adds a piece of data called 'Factors', and the text of the data period is in the second block, each of youPan stories are original "factor" value set the value of the saved time for a Factor variable.
Comments
Post a Comment