I have something like the following jQuery code
buttons =
document.createElement('div');
$(buttons).addClass("overlay_buttons").css({
styles });
save =
document.createElement('input');
$(save).attr({ type: "button",
value: "Save"
}).css({width:'45%'});
undo =
document.createElement('input');
$(undo).attr({ type: "button",
value: "Start again"
}).css({width:'93%'});
//add elements to document
$(buttons).append(undo);
$(buttons).append(save);
$(buttons +'> input').css({
shared styles for buttons
});
The problem I have is that the shared styles for the buttons don't apply. I get no error messages. I've also tried using other jQuery methods to check it's not the css that's the problem, but nothing applied to $(buttons +'> input') works.
Does anyone have any idea why?