Skip to content

Instantly share code, notes, and snippets.

@Zetzumarshen
Last active August 7, 2017 04:24
Show Gist options
  • Save Zetzumarshen/54a729c3817ddfc7668439f63508c4f3 to your computer and use it in GitHub Desktop.
Save Zetzumarshen/54a729c3817ddfc7668439f63508c4f3 to your computer and use it in GitHub Desktop.
How to fill input quickly
// tab content is parent
$.each($('.tab-content :input'),function(index, dom){
if(index % 2 == 0){
$(dom).val(index / 2);
} else {
$(dom).val("Kendala " + index /2);
}
});
// angular trigger
$('input').trigger('change');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment