-1

Am new in jquery and I already had put here this question before, but this its a little different.

Am trying getting the values of two variables GET (yes and no) with jquery. There is my code:

$('.list').append("<li><a href='#journal?today=yes&now=no'></a></li>"); 

anyone give me a hand ... :)

user2647038
  • 163
  • 6
  • What are you trying to do ? To split the string ? To get the values when user click on the link ? – blue112 Aug 29 '13 at 08:30
  • This is not that much different from your previous question, [How get variable GET with jquery and HTML](http://stackoverflow.com/questions/18494255/how-get-variable-get-with-jquery-and-html). So instead of asking basically the same thing again, you should a) show us that you actually _learned_ something from the answer to your previous question (show what you tried to solve this “new” problem on your own so far), and b) rather than opening a new question, add to your existing one by editing it, if the problem turns out to be a little more complex then you initially thought. – CBroe Aug 29 '13 at 08:37

1 Answers1

0

I presume these GET variables are already set, i.e. in the URL of the page this is on? Why don't you just use PHP

http://www.site.com/page.php?today=yes&now=no

$('.list').append("<li><a href='#journal?<?php echo $_SERVER['QUERY_STRING']; ?>'></a></li>");

or

$('.list').append("<li><a href='#journal?today=<?php echo $_GET['today'] ?>&now=<?php echo $_GET['now'] ?>'></a></li>");