ahuimanu

jQuery Hello

Mar 3rd, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Hello</title>
  5. <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
  6. <script type="text/javascript">
  7. $(document).ready(function () {
  8. $("div > p")
  9. .mouseenter(function (e) {
  10. $(this).css("color", "red");
  11. })
  12. .mouseout(function (e) {
  13. $(this).css("color", "black");
  14. }
  15. );
  16. });
  17. </script>
  18. </head>
  19. <body>
  20. <div><p>Hello to you</p></div>
  21. </body>
  22. </html>
Advertisement
Add Comment
Please, Sign In to add comment