Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • removeClass( ) event

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 117
    Comment on it

     

    removeClass( ) event is used to remove a particular class from an element on a particular event as mouseenter or mouseleave.It helps in making site more user friendly.

    <!doctype html>
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <title>removeClass demo</title>
      <style>
      p {
        margin: 4px;
        font-size: 16px;
        font-weight: bolder;
      }
      .blue {
        color: blue;
      }
      .under {
        text-decoration: underline;
      }
      .highlight {
        background: yellow;
      }
      </style>
      <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
    </head>
    <body>
     
    <p class="blue under">Hello</p>
    <p class="blue under highlight">and</p>
    <p class="blue under">then</p>
    <p class="blue under">Goodbye</p>
     
    <script>
    $( "p:even" ).removeClass( "blue" );
    </script>
     
    </body>
    </html>

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: