Replace css class with my class - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:attr

Description

Replace css class with my class

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.11.0.js"></script> 
      <script type="text/javascript">
$(document).ready(function() {
  $('.btn.btn-pagination > i').attr('class', 'myClass');
})

      </script> 
   </head> 
   <body> 
      <div class="btn btn-pagination"> 
         <i class="fa fa-angle-right"></i> 
      </div>  
   </body>/*from   www.j av a  2 s  .c o m*/
</html>

Related Tutorials