Posts

Customize File Uploading button in all browser

It is  a great challenge to customize file uploading button in browsers. So that it will look same in all browser. First thing is some how  you have to replace the file uploading button with some image. for that you just need some css and javascript and few image. So with out wasting a  min lets start . :) Step 1. first Include the javascript file in the page or application or application where ever you want. Step 2 .  Include the required css file. Now the big challenge is to customize the js and css file. Basically For mozila its a great challenge. because it takes the file field size depending upon the font size.  for that in the .js file just do one thing. in the below metioned function change in  the .js.  .mousemove(function(e){ fileInput.css({ 'left': e.pageX - upload.offset().left - fileInput.outerWidth() + 20, //position right side 20px right of cursor X) 'top': e.pageY - upload.offset().top - $(window).scrollTop() - 3 }); })