There's a lot more code wrapped around this, I just pulled out the area I know isn't working correctly.
On Mar 19, 2:00 pm, MorningZ <morni...@gmail.com> wrote: > Why so complex with jQuery objects? simple JavaScript makes much > more sense, plus the fact that ultimately all the "ends with" and > "contains" selectors use basic JavaScript in the end anyways > > http://paste.pocoo.org/show/108697/ > > On Mar 19, 12:07 pm, Brad <brad.es...@gmail.com> wrote: > > > > > Tried it, still doesn't work. I went through the 1.3 change log and > > can't find what change could have effected it. > > > On Mar 19, 11:59 am, Jörn Zaefferer <joern.zaeffe...@googlemail.com> > > wrote: > > > > Remove the @ symbol in the attribute selector, it was deprecated in > > > 1.2 and removed in 1.3 > > > > Jörn > > > > On Thu, Mar 19, 2009 at 3:06 PM, Brad <brad.es...@gmail.com> wrote: > > > > > I wrote this function to check an input field. I can fire it when the > > > > field blurs or when the form is submitted. If an .error is visible > > > > when the submit button is clicked, it won't be submitted until they > > > > are all gone. > > > > > When I try to update to 1.3 this function no longer works. > > > > > jQuery.fn.form_realemail = function () { > > > > return this.each(function (){ > > > > if ($(this).attr('value') != "") { > > > > error2 = 0; > > > > if > > > > ($(this).is("[...@value...@hotmail.com']")) { error2 = 1; } > > > > if > > > > ($(this).is("[...@value...@gmail.com']")) { error2 = 1; } > > > > if > > > > ($(this).is("[...@value...@yahoo.com']")) { error2 = 1; } > > > > if > > > > ($(this).is("[...@value...@msn.com']")) { error2 = 1; } > > > > if ($(this).is("[...@value*='@']")) { } > > > > else { error2 = 2; } > > > > if ($(this).is("[...@value*='.']")) { } > > > > else { error2 = 2; } > > > > > if (error2 == "0") { > > > > > > > > $(this).parent().find('.error').hide(); > > > > } > > > > if (error2 == "1") { > > > > > > > > $(this).parent().find('.error').show(); > > > > > > > > $(this).parent().find('.error').text("Company Emails Only."); > > > > } > > > > if (error2 == "2") { > > > > > > > > $(this).parent().find('.error').show(); > > > > > > > > $(this).parent().find('.error').text("Enter A Valid Email > > > > Address."); > > > > } > > > > } > > > > if ($(this).attr('value') == "") { > > > > $(this).parent().find('.error').show(); > > > > $(this).parent().find('.error').text("Email > > > > Address is Required."); > > > > } > > > > }); > > > > }