Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <input id=red" value=120>
  2. <div id="blue"></div>
  3.  
  4. #blue{
  5. margin-left= 120px
  6. }
  7.  
  8. (function ($) {
  9. $(document).ready(function () {
  10. $('#red').keyup(function () {
  11. var newMarginLeft = $('#red').val();
  12. $("#blue").css("margin-left",newMarginLeft);
  13. });
  14. }(jQuery));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement