Am trying getting the value of variable GET... this is my code:
$('.x').append("<li><a class='smsContact' href='#SMS2?telefone=testeValue></a>");
Am trying getting the value of variable GET... this is my code:
$('.x').append("<li><a class='smsContact' href='#SMS2?telefone=testeValue></a>");
I'm not exactly sure what you mean by "variable GET"? If you are referring to the a
element's href
attribute, and specifically the parts that would be available on a PHP GET command at the other end...
Using jQuery it would look like this:
Working jsFiddle here
$('.smsContact').click(function() {
xx = $(this).attr('href');
alert('href is: ' + xx);
justval = xx.split('=');
yy = justval[1];
alert('Just the value is: ' + yy);
});