1
I’m learning Jquery and getting my ass kicked.
I created a function in the js file like this:
$(function abrir_qd1(variavel){
$(this).click(function(){
$("#quadro1").load('arquivo.php?v=' + variavel); //carrega conteudo
});
});
and the function is called via an html link:
<a onclick="abrir_qd1('var_enviada')" class="list_nome_aguard">click aqui</a>
And through an Alert I discovered that the problem that the variable arrives at the function so:
arquivo.php?v=function (a,b){return new p.fn.init(a,b,c)}
I can’t handle it here.
Thank you in advance
The function is working. the problem is when it receives the variable there in the function 'open_qd1(variable){' It arrives at the function like this: 'Function (a,b){Return new p.fn.init(a,b,c)}' It transforms the variable
– Luckas
as he said above this mess, put an ID in your tag "<a>" and call it as in the last form he demonstrated in the example.
– Guilherme Biancardi
Got it. Problem solved. Thank you very much to the staff, I was putting the function in wrong place and so I did all that mixing.
– Luckas