Friday, 8 February 2013

User:Kaldari/Interview task (Javascript)

Created page with "Write a jQuery plugin to implement a new function called piglatinify. The function should be able to convert the text in an element into Pig Latin without losing any formattin..."


New page


Write a jQuery plugin to implement a new function called piglatinify. The function should be able to convert the text in an element into Pig Latin without losing any formatting. For example...

<nowiki>$('.sentence').piglatinify();</nowiki>

Should convert...

<nowiki><div class="sentence"><a href="#">The quick <b>brown</b> fox</a> jumps over 193 <i>lazy</i> dogs.</div></nowiki>

...into...

<nowiki><div class="sentence"><a href="#">eThay uickqay <b>ownbray</b> oxfay</a> umpsjay overay 193 <i>azylay</i> ogsday.</div></nowiki>

You don't have to worry about keeping the capitalization correct.

No comments:

Post a Comment