Today I have started to take a better look at JQuery. And it seems wonderful! Indeed. Full of wonders 🙂
Thus, I have started to code something trivial – like the picture below:
With JQuery, this click option of the text (this is not a link), is just one liner. With JS it would have been one line as well, but with some more words. Anyhow, the code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<!DOCTYPE HTML> <html> <head> <title>VitoshAcademy.Com</title> <script src="jquery-1.10.1.min.js" type="text/javascript"> </script> <script> $(document).ready(function() { $("#idText").click(function() { $("#idDiv").html("<b><a href=http://www.herecomesthecode.com>herecomesthecode.com</a></b>"); }); }); </script> </head> <body> <div id="idDiv"> <p>vitoshacademy.com</p> <a id="idText" href="#">Click Me</a> </div> </body> </html> |
At this moment I usually say “Enjoy it”, but this time I would just keep quiet 🙂