ID's have to start with a letter like the validator and james said. You didn't really explain why, you just showed a block of code.
I think I get what you're trying to do but you really shouldn't be using IDs like that. ID's are a unique way to IDentify an element, not to get tricky with linking 2 dom nodes together. I suppose you could replace the # in your ID with some string if you really want to get it to work this way though <div id="tab_links"> <a href="#" id="'Jump_to_tab_1'" class="active">slide 1</a> <div id="tabs"> <div id="tab_1" style="display:block;"> slide 1 The script: var activeTab = $(this).attr('id') activeTab = activeTab.replace('Jump_to_",''); $(activeTab).fadeIn(500); But I really wouldn't recommend this approach , there are better ways to find elements. http://docs.jquery.com/Traversing On Mar 31, 5:14 pm, Warfang <warfang...@gmail.com> wrote: > Yes, but I explained why... > "I, though, used single quote marks so that it > worked with the second line of script that I showed you." > > I just need to know what to put in the var line so that I can remove > those quotes. > > On Mar 31, 7:49 pm, James <james.gp....@gmail.com> wrote: > > > <a href="#" id="'#tab_1'" class="active">slide 1</a> > > is suppose to be: > > <a href="#" id="tab_1" class="active">slide 1</a>