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");
});
});
I am looking to change the font size when clicking a button, but also keep the red color intact. Currently, the code I have written changes the font size but removes the color. Is there a way to modify the font size while retaining the red color?