[jQuery] Re: Plugin Question
Found it: When you specify rules in the validate-call, the name is referenced, not the id. Replacing select with field_3 (or renaming the latter) should fix it. Jörn On Fri, Feb 6, 2009 at 12:20 AM, Chris cpot...@siolon.com wrote: On Feb 5, 6:17 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: I'm sorry. I confused the (hidden) select and the text input. Please revert that last change and lets try again. Jörn It's reverted.
[jQuery] Re: Plugin Question
On Feb 6, 3:46 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Found it: When you specify rules in the validate-call, the name is referenced, not the id. Replacing select with field_3 (or renaming the latter) should fix it. Jörn Perfect! Thanks.
[jQuery] Re: Plugin Question
var r = jQuery(#rsvp).validate({ rules: { select: { required: #accept:checked } }, RIGHT HERE submitHandler: function(form) { jQuery(form).ajaxSubmit(options2); } }); On Feb 5, 10:44 am, Chris cpot...@siolon.com wrote: On Feb 5, 3:23 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Could you provide a testpage? Your code looks fine. Jörn Sure.http://www.chris-gwen.com/Right now Firebug says i'm missing a semicolon which breaks everything, but i don't see why it says that.
[jQuery] Re: Plugin Question
Thanks James. Now the page doesn't break, but my validation rules still don't hold.
[jQuery] Re: Plugin Question
Remove the required-class. That overrides the dependency-required-rule. Jörn On Thu, Feb 5, 2009 at 9:58 PM, Chris cpot...@siolon.com wrote: Thanks James. Now the page doesn't break, but my validation rules still don't hold.
[jQuery] Re: Plugin Question
On Feb 5, 4:34 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Remove the required-class. That overrides the dependency-required-rule. Jörn Sir, From the markup above (Google Group) the only thing I include on the radio button is the validate=required:true. Should I remove that? I tried to remove it, and it didn't do anything. Also, is the :checked selector the one I want for a radio button?
[jQuery] Re: Plugin Question
You've got class=required on the text-input-element. The validation picks that up as a validation rule. Removing it should give you the correct rule instead. Could be considered a bug, where the option-rule should override the class rule, instead of the current behaviour. Jörn On Thu, Feb 5, 2009 at 10:56 PM, Chris cpot...@siolon.com wrote: On Feb 5, 4:34 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Remove the required-class. That overrides the dependency-required-rule. Jörn Sir, From the markup above (Google Group) the only thing I include on the radio button is the validate=required:true. Should I remove that? I tried to remove it, and it didn't do anything. Also, is the :checked selector the one I want for a radio button?
[jQuery] Re: Plugin Question
On Feb 5, 5:50 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You've got class=required on the text-input-element. The validation picks that up as a validation rule. Removing it should give you the correct rule instead. Could be considered a bug, where the option-rule should override the class rule, instead of the current behaviour. Here's what I don't understand. (1) how now do I make sure the text input element is required? (2) The form still allows me to submit value= (in this case it has a # there) when the accept radio button is selected.
[jQuery] Re: Plugin Question
I'm sorry. I confused the (hidden) select and the text input. Please revert that last change and lets try again. Jörn On Fri, Feb 6, 2009 at 12:02 AM, Chris cpot...@siolon.com wrote: On Feb 5, 5:50 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You've got class=required on the text-input-element. The validation picks that up as a validation rule. Removing it should give you the correct rule instead. Could be considered a bug, where the option-rule should override the class rule, instead of the current behaviour. Here's what I don't understand. (1) how now do I make sure the text input element is required? (2) The form still allows me to submit value= (in this case it has a # there) when the accept radio button is selected.
[jQuery] Re: Plugin Question
On Feb 5, 6:17 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: I'm sorry. I confused the (hidden) select and the text input. Please revert that last change and lets try again. Jörn It's reverted.
[jQuery] Re: Plugin Question
Inside the plugin this is actually the jQuery object that the plugin was called on. (function($) { $.fn.plugin = function() { console.log(this); // the jQuery collection/object }; })(jQuery); -- Brandon Aaron On 9/25/07, Eridius [EMAIL PROTECTED] wrote: Ok, lets say i make a plugin using this (function())(jQuery) format and it works like this: $('#something').plugin(); Now inside the plugin this is the access for the class, how do i access the jquery object that the plugin was called on? -- View this message in context: http://www.nabble.com/Plugin-Question-tf4516781s15494.html#a12883523 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: Plugin question
Good point is... it sounds like i'm going to learn something again today :) Me too because your code looks fine to me! Did you try stepping through the code with Firebug? Mike
[jQuery] Re: Plugin question
Yes, and nothing wrong comes up as errors. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Alsup Sent: lundi 18 juin 2007 12:15 To: jquery-en@googlegroups.com Subject: [jQuery] Re: Plugin question Good point is... it sounds like i'm going to learn something again today :) Me too because your code looks fine to me! Did you try stepping through the code with Firebug? Mike Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.472 / Base de données virus: 269.9.0/852 - Date: 17/06/2007 8:23