I removed the font resizing script and changed the font size instead with transition when changing the length and width
this code
#outer {
display: table;
width: 500px;
height: 300px;
transition: all 1s;
}
#outer.newouter {
display: table;
width: 700px;
height: 400px;
}
I changed it with this code
#outer {
display: table;
width: 500px;
height: 300px;
font-size: 18px;
transition: all 1.5s;
}
#outer.newouter {
display: table;
width: 700px;
height: 400px;
font-size: 48px;
}
complete code:
//Jquery for change outer div width
$('.newsize').on('click', function() {
$('#outer').toggleClass('newouter');
});
#outer {
display: table;
width: 500px;
height: 300px;
font-size: 18px;
transition: all 1.5s;
}
#outer.newouter {
display: table;
width: 700px;
height: 400px;
font-size: 48px;
}
#inner {
border: 1px solid black;
height: 170px;
text-align: center;
display: table-cell;
vertical-align: middle;
word-break: break-all;
}
<script src="code.jquery.com/jquery-1.9.1.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<button class="newsize"> Change Width Height </button>
<div id="outer">
<div id="inner" contenteditable=true>
We think the Spirit working through the Word, not an expert at the head of the classroom, is essential to discipleship. When we begin here we learn “how to think biblically”. Our focus is less on answering questions you don’t have and more on helping you learn how to find the answers within thes is less on answering questions you don’t have and mos is less on answering questions you don’t have and more on helping you learn how to find the answers within the Bible. We must seek Jesus in the Bible, trusting that God has the answers. This means learning patichurch leadership, but we are available to supply coaches to be to answer questions or suggest next areas to study based on their questions.
</div>
</div>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…