Hi yvonney, Try jsbin.com, it's very useful. You just paste your html/javascript in there and it can be edited and shared.
For the HTML you posted, this would work: $('ul.first a').click(function(){ var n = this.id.substring(3); //get the numbers only $('#vid'+n).click(); // same as trigger('click'); }); the "name" attribute for anchors has been deprecated in XHTML, the ID is enough. On Jan 5, 2:47 am, yvonney <yvonn...@gmail.com> wrote: > Ricardo !!! > > Sorry to miss answering your question: > YES... the first menu has UL around it... and that MAY be important as > each of the THREE menu sections has a TOP item like so. (the id and > name that I've added I left in though are not needed currently for > this to work. Again: there's 3 sections here the first one. > > And YES, the videos will be in the exact same order so say, 15 menu > items (first 5 below) and 5 in each section. And then for the videos. > 15 videos ALL in the same order. > > The VIDEOS are NOT surrounded in anthing other than a main videos div. > NO UL extra LI or anything. There's no reason not to though. Actually > would that be best? Then I could hide them perhaps? > > <li> > <a id="onetitle" name="onetitle" href="#first" > class="first">Section1Landing</a> > <ul class="first"> > <li><a id="one1" name="one1" href="#first-a">section 1 item 1</a></li> > <li><a id="one2" name="one2" href="#first-b">Song Writing Session</a></ > li> > <li><a id="one3" name="one3" href="#first-c">ITEM first-c</a></li> > <li><a id="one4" name="one4" href="#first-d">ITEM first-d</a></li> > <li><a id="one5" name="one5" href="#first-e">ITEM first-e</a></li> > </ul> > </li> > ---------- > <a href="vid1.flv" id='vid1' name='vid1' class="media"> video1</a> > <a href="vid2.flv" id='vid2' name='vid2' class="media">video2</a> > <a href="vid3.flv" id='vid3' name='vid3' class="media">video3</a> > <a href="vid4.flv" id='vid3' name='vid4' class="media">video4</a> > <a href="vid5.flv" id='vid3' name='vid5' class="media">video5</a> > > NOTE: the class 'media' HAS to remain in the above 5 video hrefs. > > I could put the videos anyways at all to make it work easier/better. > > Right now they are just links on the page that work. > > I guess I should have pointed out the little extra bit, that being the > TOP menu's FIRST and main menu item which is name, Section1Landing. As > you'd know it's the one that heads up the other 4 items and it should > PERHAPS have something happen like a picture or short video occur when > it's triggered. > > Doesn't have to though ... if I'm making things more complicated at > this time. > Though the video div is empty when the page loads. I'll think about > that later. > > REALLY gonna stay up all night to see if I can get this working... > > Thanks to all. And thank you Ricardo for this most interesting help/ > code. > I will work on it now.