Jump to content


Photo

Carregar Arquivos De Plugins Externos


  • Faça o login para participar
Nenhuma resposta neste tópico

#1 hostdesigner

hostdesigner

    Super Veterano

  • Usuários
  • 2910 posts
  • Sexo:Masculino
  • Localidade:Quirinópolis-GO
  • Interesses:Programação, Mulheres, Diversão, Mulheres, Música, Mulheres, Meu Carro, Mais mulheres, Internet, Outras Mulheres, Quase por último PAZ e por ultimo Outras Váááárias Mulheres...

Posted 30/11/2009, 12:49

Estou tentando a horas realizar o carregamento de plugins do JQuery via JavaScript e não consigo, alguém faz idéia de como fazer?
var filePath = "/js/plugins/";


var jsFiles = new Array(
	"jquery.jcarousel.pack",
	"jquery.autocomplete",
	"jquery.maskedinput-1.2.2.min",
	"jquery.price_format.1.0",
	"jquery.qtip-1.0.0-rc3.min",
	"jquery.thickbox-compressed",
	"jquery.ui-1.7.2.custom.min",
	"jquery.lightbox-0.5.min",
	"livevalidation_standalone.compressed"
);

var files = new Array();

var antes = "<script language=\"javascript\" src=\"";
var depois = "\"></script>";


for( i=0; i <= ( jsFiles.length -1 ); i++ )
{
	
	if( ( jsFiles[ i ] != 'undefined' ) && ( jsFiles[ i ] != '' ) )
	{
		files = antes + filePath + jsFiles[ i ] +".js"+ depois;
	}
}

$( "body" ).html( files );

Tentei assim e não funciona também
<html>

<head>


</head>


<body>


<script src="jquery-1.3.2.min.js"></script>
<script src="funcoes.js"></script>




</body>
</html>

Falopa!




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq