javascript - Firefox Input Label and jquery 1.9 -


i'm trying figure out best way of detecting firefox without use of .browser (since jquery 1.9 has deprecated)

essentially have html:

<label class="uploadbutton" for="test">test</label> <input type="file" name="test"/> 

this works fine ie , chrome nothing in firefox. pre 1.9 had this:

if ($.browser.mozilla) {     $('.uploadbutton').click(function () {         $(this).siblings("input").click();     }); } 

which worked without issues.

what best way of making work .browser property gone?

(i looked under features , found no feature detect well..)

i found

ua = window.navigator.useragent.tolowercase() 

as part of answer here.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -