Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.28 KB | None | 0 0
  1. <form enctype="multipart/form-data" method="post" action="idea.php?id=89&edit=true" class="editideaform">
  2.         <div class="imagewrap">
  3.             <img alt="" src="images/ideaimages/idea_89_2132_1290078215_footer_pics.jpg">
  4.                  <input type="file" value="" name="ideapicture"><div class="inputfake noimg" style="z-index: 400;"><input type="submit" class="savepicture" value="" name="submit" style="opacity: 1; border: 0pt none; background-color: transparent; bottom: 5px; left: 0pt; color: rgb(12, 160, 224);"></div>        </div>
  5.         </form>
  6.  
  7.  
  8. <script type="text/JavaScript">
  9. $('.idea .rightside .imagewrap input[type=file], .profile .userimagewrap input[type=file]').change(function(){
  10.         if($(this).val() != ''){
  11.             $(this).siblings('.inputfake').addClass('noimg').html('').append('<input type="submit" name="submit" value="" class="savepicture" />').css(
  12.                 'zIndex', 400).children('input').css({
  13.                 opacity: 1,
  14.                 border: '0 none',
  15.                 backgroundColor: 'transparent',
  16.                 bottom: '5px',
  17.                 left: '0',
  18.                 color: '#0CA0E0'
  19.             });
  20.             console.log($(this).parent().parent());
  21.             $(this).parent().parent().submit();
  22.         }
  23.     });
  24. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement