Skip to content

Instantly share code, notes, and snippets.

@benedmunds
Created July 10, 2015 03:34
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 benedmunds/6b2d4a148233334e6865 to your computer and use it in GitHub Desktop.
Save benedmunds/6b2d4a148233334e6865 to your computer and use it in GitHub Desktop.
$(element).find('input[type=radio], input[type=checkbox]').each(function()
{
var tIndexChangeHandler = function()
{
var selected_element = $(this);
obj.validate(element,function(obj){
var tab = $(selected_element).closest('div[data-role=page]');
var idx = Number($(tab).attr('t_index'));
if (obj.valid === false)
{
$('#tabs li:eq('+idx+')').removeClass('verified');
}
};
$(this).unbind('change', tIndexChangeHandler);
$(this).bind('change', tIndexChangeHandler);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment