skip to Main Content

Jquery ajax – I want to add more css property to my html element using Jquery means I dont want to remove the previous one just simply add more to it

Index.html <html> <head> <script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script> <!-- jquery-3.4.1.min --> <script type="text/javascript" src="custom.js"></script> </head> <body> <div class="epic" style="color:red">hello this is title</div> <div>hello this is title</div> <input type="button" placeholder="click it" value="click"> </body> </html> custom.js $( document ).ready(function($){ $(":button").click(function(){ $(".epic").attr("style","font-size:100px"); }); });…

VIEW QUESTION
Back To Top
Search