jQuery custom validation method issue

前端 未结 2 1050
[愿得一人]
[愿得一人] 2020-12-07 06:27

I have a select list that\'s default value (for Please Select) is 0. this is due to the payment processing system and beyond my control. I have an add.Method that states if

相关标签:
2条回答
  • 2020-12-07 06:45

    When you're using jsfiddle (with the slightly unorthodox way in which it adds elements to the iframe), you need to include your JS directly in the HTML section below where you reference your plugin. I seem to have got it working using only your code:

    http://jsfiddle.net/Yjt98/1/

    This is what you want it to do, correct? It appears to be validating the fields with the onchange event. Lemme know if you're expecting different behavior.

    0 讨论(0)
  • 2020-12-07 06:52

    Try forcing validation in the blur event.

    $('#singleTech').click(function() {
      $('#SinglePmnt').validate().element('#singleTech');
    });
    
    $('#singleTech').blur(function(){
      $('#SinglePmnt').validate().element('#singleTech');
    });
    

    jQuery change() on <select> and firefox

    The live link you posted earlier seems to work in IE, but not FireFox.

    0 讨论(0)
提交回复
热议问题