Still a relative newbie. Sorry about that. I'm trying to declare a function as a property of another function. I'm sure I can do this, and that the syntax is correct. But I keep getting "function statment requires an name" as an error; implying it thinks I'm creating an anonymous function.
Here's the code. It's throwing the error on the hide and show parameters. What am I missing?
function band(){
var width_offset = {
high: "left:-376px",
low: "up:-200px" ,
}
hide : function(width_offset){
if ($(document).width < 768){
$("#band").animate({width_offset.low}, {queue: false, duration: 200});
}else{
$("#band").animate({width_offset.high}, {queue: false, duration: 200});
};
}
show : function(){ $("#band").animate({left:'0px'}, {queue: false, duration: 200}); }
}
Thanks.