Looking to add interactivity to rotate text within a div upon button click using jQuery and CSS.
If the user selects Rotate Left
, the text will rotate to the left. Alternatively, if the user chooses Rotate Right
, the text will rotate to the right.
Here's an example:
<div id="RotateDiv">Happy Birthday</div>
<button id="btnRotateLeft" type="button">Rotate Left</button>
<button id="btnRotateRight" type="button">Rotate Right</button>