KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is it possible to do something like this $('#idone').click(function(){ alert('we do stuff!'); }); $('#idtwo').click(function(){ $('#idone').click(); }); ... i guess not, but are there any possible workarounds? !UPD: Well, ok. It's a little bit more complicated. I have a jCarousel analog installed - JQueryTOOLS - Scrollable - I guess that's what its name the link: http://flowplayer.org/tools/demos/scrollable/gallery.html I presume that it has click() event somehow hardcoded in it and when i click thumbs the plugin scrolls it to center position. Then I've bound another click event, so that I can display large image. It works similar to the example in the link above Now I have to make this big image clickable, so clicking it I can proceed to next image in gallery, I did that, but now I have to make the carousel scroll automatically to the next thumb when I am clicking this big image. So, if I simplify my code, the essence is still smth like that: $('#idone').click(function(){ alert('we do stuff!'); }); $('#idtwo').click(function(){ $('#idone').click(); }); where #idone is a thumb in the gallery, #idtwo is that preview image. I dont know what function is bound to click by default. Another thing: my guess was that binding the same event to the same object should replace the previous - it appears not necessarily.. And I'm pretty sure that it is exactly click();, not mouseup\down etc. cause calling $('#idone').click(); on page load does the trick and carousel scrolls to the thumb with id="idone" just in case: jquery-1.3.2.js thanks everyone for your answers, and excuse me my lame English, no time for brushing up (: !UPD: ok! so I gave up on this one )) But to close this question and put an end t
Tags (comma-separated)
Save Edits
Cancel