[Solved]Jquery Quite Common Use Anonymous Inline Functions 2 Explain Inline Anonymous Functions Di Q37280899

(a) In jQuery it is quite common to use anonymous inline functions. 2. Explain what “inline anonymous functions” are, and discuss what is their limitation (i.e., when named functions or ‘not-inline, functions should be used instead). 4 marks] 1 <!DOCTYPE html <html> <head> 2 3 <script> $document.ready (function) $.get (‘findName.php’, fuserID 7 ‘al45′, function(data) $body).append( <p-Hello 1, string’); data + ‘</p>’); 10 12 13 14 15 16 17 </head> 18<body> 19</body> 20 </html> $(‘p).css(‘background-color’, ‘green’); </script> (i) Explain what the code in lines 5-11 does. [6 marks] (ii) The statement in line 13 is supposed to change the background colour of the element <p to green. Unfortunately, when running the code in the figure, this does not happen and the background color of the <p> element remains white. Explain why the statement in line 13 does not work as expected, and how you can fix it. [3 marks] Show transcribed image text (a) In jQuery it is quite common to use anonymous inline functions. 2. Explain what “inline anonymous functions” are, and discuss what is their limitation (i.e., when named functions or ‘not-inline, functions should be used instead). 4 marks]
1
Expert Answer
Answer to (a) In jQuery it is quite common to use anonymous inline functions. 2. Explain what “inline anonymous functions” are, an… . . .
OR

