hi guys,
i saw somewhere on the net the next type of changing the icon of button inline
not that the the button itself was already called in document ready
- $(document).ready(function(){
- $("input:radio").each(function(i,obj){
- obj.button();
- });
- })
with the html:
- <input class="{button:{icons:{primary:'ui-icon-check'}}}" type="radio" name="face_release_radio" value="1" id="face_release_1" /><label for="face_release_1">Yes</label>
this does the job quite well placing the icon.
But when i try to validate is it selected:
- $("#step3form").validate({
rules: {
face_release_radio: {
required: true
}
},
messages: {
face_release_radio: {
required: "Please answer the first question"
}
},
submitHandler: function(form){
$(form).ajaxSubmit(options);
},
onfocusout: false,
onkeyup: false,
onkeypress: false,
onsubmit: true,
success: "",
errorClass: "invalid",
errorElement: "em",
errorPlacement: function(error, element){
//console.log($("label[for*='"+element.attr('name')+"']").get(0));
var label = $("label[for*='" + element.attr('name') + "']").get(0);
$(label).append(error);
},
debug: false
});
the validate plugin is trowing an error
that this validation method does not exist:
- $.validator.methods[method] is undefined
http://localhost/js/jquery.validate.js
Line 494
and the method witch exception is catch on Line 513
is button
So, I thing probably the problem occurs because of changes in jquery and jqueryUi, after all , this plugin is last updated in 2009, and there was no button widget in jquery UI as I remember.
Please help me resolve this issue if i have to modify the jquery validation plugin