Aterando jQuery simples

26/09/2016

0

alguém que entenda de jQuery pode reescrever essa função sem usar o $ (dólar)
Motivo: dólar da conflito com o primefaces
OBS: não adianta substituir por outra variavel

jQuery(document).ready(function($) {

	$(".popupExibirInformacoes").css('right', '-300px');
	var isExpanded = false;
	$(".m-menu").click(function () {
		
	    if (!isExpanded) {
	        $('.popupExibirInformacoes').animate({ right: '0' }, { duration: 500, queue: false });
	        $('#ColunaDireitaTabela').animate({ 'width': '80%' }, { duration: 500, queue: false });
	    }
	    else {
	    	 $('#ColunaDireitaTabela').animate({ 'width': '100%' }, { duration: 500, queue: false });
	        $('.popupExibirInformacoes').animate({ right: '-300' }, { duration: 500, queue: false });
	    }
	    isExpanded = !isExpanded;
	});
});
Michael Batista

Michael Batista

Responder

Posts

26/09/2016

Diego Silva

Já tentou usar o jquery noConflict() ?
Responder

26/09/2016

Michael Batista

sim, ele piora as coisas e trava todos componentes do primefaces
Responder

26/09/2016

Michael Batista

TIREI ALGUNS PRINTS DA MINHA APLICAÇÃO PARA VISUALIZAR MELHOR O PROBLEMA

http://www.tiikoni.com/tis/view/?id=34ba49f
http://www.tiikoni.com/tis/view/?id=475d4ea
http://www.tiikoni.com/tis/view/?id=9cddad8
Responder

27/09/2016

Victor Machado

Olá Michael.
Já tentou fazer assim?

jQuery(document).ready(function(jQuery) {
 
    jQuery(".popupExibirInformacoes").css('right', '-300px');
    var isExpanded = false;
    jQuery(".m-menu").click(function () {
         
        if (!isExpanded) {
            jQuery('.popupExibirInformacoes').animate({ right: '0' }, { duration: 500, queue: false });
            jQuery('#ColunaDireitaTabela').animate({ 'width': '80%' }, { duration: 500, queue: false });
        }
        else {
            jQuery('#ColunaDireitaTabela').animate({ 'width': '100%' }, { duration: 500, queue: false });
            jQuery('.popupExibirInformacoes').animate({ right: '-300' }, { duration: 500, queue: false });
        }
        isExpanded = !isExpanded;
    });
});
Responder

27/09/2016

Michael Batista

sim, continuou com erro.
mas depois eu consegui resolver, simplesmente retirando a div popup de dentro de um <p:panelGroup> do primefaces
mas mesmo assim Obrigado a galera que tentou ajudar.
Responder

Assista grátis a nossa aula inaugural

Assitir aula

Saiba por que programar é uma questão de
sobrevivência e como aprender sem riscos

Assistir agora

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar