daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest Dec 13th, 2018 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(".idemp").each(function(index, value) {
  2.    
  3. var empresaJaAdicionada = false;
  4. $(".idemp").each(function(index, value) {
  5.   var vText = console.log($(this).text());
  6.   if ($(value).val() == vIdEmpresa) {
  7.     console.log('Empresa ja foi adicionada!');
  8.     empresaJaAdicionada = true;
  9.   }
  10. });
  11. if (!empresaJaAdicionada) {
  12.     var linha = '<tr class="selected" id="linha' + cont + '">' +
  13.       '<td>' +
  14.       '<input class="idemp" type="hidden" name="idempresa[]" value="' + vIdEmpresa + '">' + vEmpresa +
  15.       '</td>' +
  16.       ' </tr>'
  17.     cont++;
  18.     $('#mytbody').append(linha);
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top