Skip to content

Instantly share code, notes, and snippets.

@goofmint
Created May 16, 2017 01:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goofmint/d318e8d3bc638e93d152f9eff8540f7b to your computer and use it in GitHub Desktop.
Save goofmint/d318e8d3bc638e93d152f9eff8540f7b to your computer and use it in GitHub Desktop.
7.md
// エラーが解消されたときに実行されるハンドラ,
unHighLightArea: function(orgThis, el, error, errorClass) {
var $el = $(el);
$el.css('background-color', '');
// 操作した要素が「1日の喫煙本数」テキストボックスでかつ、「たばこを吸っていますか」チェックボックスが「いいえ」の場合は、
// 「1日の喫煙本数」テキストボックスのハイライトを除去する
if ($el.is('[name="conf_tobacco"]') && this.$find('[name="conf_tobacco"]:checked').val() === 'female') {
this.$find('[name="count"]').css('background-color', '');
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment