Somewhat simple question, but I can not work it
I have a simple check to see that the browser supports the placeholder feature. If they do not believe that I want to set the input field value with jquery
I'm testing it on Firefox, but it can not work. I do not get any warning area.
This is what I have found and what does not work ...
jQuery.each (jQuery.browser, function (I, val) {if (i == "Mozilla" && jQuery.browser.version.substr (0,3) = = "1.9") {$ ("Input"). Each (function () {warning (this .id);});}});
Also tried without result
jQuery.each (jQuery.browser, function (i, val) {if (i == "Mozilla "&& jQuery.browser.version.substr (0,3) ==" 1.9 ") {var $ input = $ (" form: input "); $ inputs.each (function (l) {warning (el.id) ;});}});
try it
if ($. Browser ['opera']) {var $ inputs = $ ("form input"). Each (function () {$ (this) .val ('opera');}} else if ($ .browser ['mozilla']) {Var $ inputs = $ ("form input"). {$ (This) .val ('mozilla');}}
Update
var ids = $ .map ($ ("Form input"), function (elem, i) {return $ (this) .attr ('id');}); warnings ('all id =' + id. (','));
Comments
Post a Comment