Javascript examples for jQuery Method and Property:attr
Replace css class with my class
<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>