Alright, I just realized what i was doing wrong. It was this little piece:
wrap.grab(buttonbar.hide());
This is rubbish, because buttonbar
is not in the DOM already. It has to be split up to:
wrap.grab(buttonbar);
buttonbar.slide('hide');
After that, it just took a few changes in the event setting:
editor.addEvents({
'click': function(ev) {
ev.stop();
buttonbar.show();
},
'mouseenter': function(ev) {
ev.stop();
this.addClass('mark');
buttonbar.show();
//this.slideIn();
},
'mouseleave': function(ev) {
ev.stop();
//buttonbar.hide();
this.removeClass('mark');
}
});
to this:
editor.addEvents({
'click': function(ev) {
ev.stop();
buttonbar.slide('toggle');
},
'mouseenter': function(ev) {
ev.stop();
this.addClass('mark');
buttonbar.slide('in');
},
'mouseleave': function(ev) {
ev.stop();
this.removeClass('mark');
buttonbar.slide('out');
}
});
And now my slides slide as hell :)) Here a link to the fiddle.