johndoe johndoe - 2 years ago 134
Javascript Question

image rotation using input box?

How can I make text rotation using an input box to manipulate the rotation. I had text rotation using mouse but that got to be really complicated when I used draggable.
Please help me

Answer Source

I hope this will guide you to accomplish it

       var x= $("#rotateInput").val();      
     $("#rotate").css('transform','rotate(' + x + 'deg)');
  background: url('');
   width: 180px;
  margin:40px auto;
<script src=""></script>

   <div id="rotate"></div>

<input id="rotateInput" type="text" value="0">
<button id="rotateButton">Rotate It</button>


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download