I would like to style <input type="file" />
using CSS3.
Alternatively, I would like user to press on a div
(that I will style) and this will open the Browse window.
Is that possible to do that using HTML, CSS3, and Javascript / jQuery only ?
I would like to style <input type="file" />
using CSS3.
Alternatively, I would like user to press on a div
(that I will style) and this will open the Browse window.
Is that possible to do that using HTML, CSS3, and Javascript / jQuery only ?
check this :
http://api.jquery.com/click/
http://stackoverflow.com/questions/180211/jquery-div-click-with-anchors
I have this rough example that you might want to get some idea...
<div id="file">Chose file</div>
<input type="file" name="file" />
#file {
display:none;
}
var wrapper = $('<div/>').css({height:0,width:0,'overflow':'hidden'});
var fileInput = $(':file').wrap(wrapper);
fileInput.change(function(){
$this = $(this);
$('#file').text($this.val());
})
$('#file').click(function(){
fileInput.click();
}).show();