var tabId = $("#tabPanel2 ul li a[onclick*="+newsCookie+"]").attr ('id');
Whether the actual selector works or not, I'm not sure. On Oct 8, 11:38 am, vmrao <maheshpav...@gmail.com> wrote: > I have the following code. > > var newsCookie = readCookie('newsTabCk'); > var tabId = $("#tabPanel2 ul li a[onclick*=newsCookie]").attr('id'); > > In the second statement above, newsCookie is being considered as text > rather than a variable. What should be done to consider newsCookie as > a variable rather than as text/string ? > > Thanks