我有一个带参数的js函数:
function dimension(id){
val = {
acMaximize : [
["#container", "100%", "90%"]
],
acMinimize : [
["#container", "70%", "60%"]
],
};
var sub = val[id];
var sub1;
for(i in sub){
sub1 = sub[i];
$(sub1[0]).css({
width : sub1[1],
height : sub1[2]
});
}
}
我尝试在bind方法中调用此函数:
$(document).bind("keydown", "Ctrl+A", dimension(id)); // <-- this didn't work.
我怎么能这样做?
//修改
就jQuery热键而言。