Created
May 27, 2014 14:24
-
-
Save ricardofiorani/787881c2ed7c314d9ffd to your computer and use it in GitHub Desktop.
COnCÔn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
// Quando descrição tem muito caracter | |
$(".compare .atributo").each(function(){ | |
if ( $(this).html().length > 30 ){ | |
$(this).addClass("char-G"); | |
} | |
}); | |
// Ajax Select 2 quando seleciona uma maquina para comparar | |
$('.compare select').change(function(){ | |
$(this).parent().parent().parent().parent().addClass($(this).attr('id')+'sel'); | |
$(this).parent().parent().parent().addClass("menor"); | |
var idSelect = $(this).attr('id') + "sel"; | |
var nomeMaquina = this.value; | |
$.ajax({ | |
url: "inc_item-comparacao.php", | |
beforeSend: function ( ) { | |
$(this).parent().parent().hide(); | |
$.fancybox.showLoading(); | |
} | |
}).done(function ( data ) { | |
$('.' + idSelect + ' .recebe-item').html(data); | |
$('.' + idSelect + ' .recebe-item').fadeIn(500); | |
$.fancybox.hideLoading(); | |
}) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment