I have a feeling there is an obvious answer to this, but it escapes me...

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
        });
}

Thanks!
-- 
View this message in context: 
http://www.nabble.com/1-Function%2C-Multiple-Events--tf2959063.html#a8278042
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to