<!DOCTYPE html> <html> <head> <title>Try jQuery Online</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script> $(document).ready(function() { $("em").addClass("selected-changed-to-red"); $("#anyElementById").addClass("highlight-yellow"); }); </script> <style> .selected-changed-to-red { color:red; } .highlight-yellow { background:yellow; } </style> <article> <em title="Bold and Brave">This is first paragraph hOver "Bold and Brave".</em> <p id="anyElementById" title="Shy and Isolated">This is second paragraph "Shy and Isolated"</p> </article> </body> </html>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more