Removing or altering CSS pseudo class in jQuery - Javascript jQuery

Javascript examples for jQuery:CSS

Description

Removing or altering CSS pseudo class in jQuery

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.js"></script> 
      <style id="compiled-css" type="text/css">

input:focus {/*from  w w  w . j  a v  a  2 s  . c  o  m*/
   background: yellow
}
      </style> 
      <script type="text/javascript">
    $(function(){

$('head').append('<style>input:focus{background:#fff}</style>');

    });

      </script> 
   </head> 
   <body> 
      <input>  
   </body>
</html>

Related Tutorials