> if have some thing like this that is called by document.ready(): > > function init_top_level() { > $(".top_folder").click(function(i) { > // Do a ton of stuff here > }); > } > > I not only want to assign the "click" event to my ".top_folder" > elements, but assign "dblclick" as well. I know I could always > break my "Do a ton of stuff here" out as a separate function > and assign it from 2 separate $(".top_folder").click and > $(".top_folder").dblclick. Is there an easier way to do this? > Something like: > > function init_top_level() { > $(".top_folder").click AND > $(".top_folder").dblclick(function(i) { > // Do a ton of stuff here > }); > }
I don't understand what you want to do. Jörn's answer assigns the exact same function to the click and dblclick events. Surely that is not what you want, is it - having click and dblclick do the same thing? Keep in mind especially that every dblclick event is preceded by a click event, so you'd be calling the function twice. So can you explain in a little more detail what you want to do here? -Mike _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/