really? I thought one had to namespace an event for it not to overwrite previously set behaviours.
$('a').bind('click.scroll',function(){ scrollTo(moon); }); $('a').bind('click.alert1',function(){ alert('Me works too'); }); }); On Mon, Dec 29, 2008 at 5:06 PM, Ricardo Tomasi <ricardob...@gmail.com> wrote: > > You can add as many listeners as you want: > > $('a').click(function(){ > scrollTo(moon); > }); > > $('a').click(function(){ > alert('Me works too'); > }); > > $('a').click(function(){ > alert('damn, stop using alerts'); > }); > > $('a').click(function(){ > openFlash(); > }); > > > On Dec 29, 7:37 am, yvonney <yvonn...@gmail.com> wrote: >> Hi... just starting out to get this going. >> >> I'm guessing that the reason onclick code has the #, for example: <a >> href="#" onclick="someFunction.add "etc code etc etc" ></a> >> >> is because it can't do the onclick AND more typical things like this >> example: >> >> <li><a href="#myID"></a></li> >> >> Is because they conflict... >> >> SOooooo! >> >> I have my Li/ul menu code doing a bunch of scrollto stuff. Took weeks >> to figure out. >> >> NOW I need to have the SAME menu, when I click on the Li's bring up a >> different flv video for each menu item (li) >> >> sheeesh... do I use live query or what. >> I'm REALLY stumped... I do have a much greater 'sorta' understanding >> of the: neolao flv player, swfobject2, jquery.swfobject.js, jmedia >> plugin, luke's flash plugin, and malsup's medai plugin. >> >> whew! :--) >> >> Though the REAL problem is to get some kinda elegant way of having the >> flv videos play in a seperate div location (stop when new video starts >> as well) when I click on each and every menu item. >> >> And, there menu items already are doing their scrollto coda-scroller >> type thing already. >> >> Yes... this question is my biggest question ever... >> Could a guru please comment on how to get the menu items to do BOTH >> what they're doing now as standard <li><a href="#myID"></a></li> >> AND also do the calling of the (I guess?) onclick thing to call the >> videos individually at the same time. >> >> I guess it shouldn't take me more than all year to do... hehehe what's >> left of it thank fully! if that makes sense...hehehe >> >> thank you for reading.