}
var root = $('body');
- var bar = $('<div class="cloudbar"></div>');
+ var bar = $('<div class="cloudbar clearfix"></div>');
var services = $('<ul class="services"></ul>');
var profile = $('<div class="profile"></div>');
slink.attr('title', el.name);
sli.append(slink);
services.append(sli);
- if (el.id == ACTIVE_MENU) {
+ if (el.id == ACTIVE_MENU || el.name == ACTIVE_MENU) {
sli.addClass("active");
}
});
$.getJSON(get_menu_url, function(data) {
$.each(data, function(i,el) {
if (i == 0){
- username.text(el.name);
+ username.html('<span>'+el.name+'</span>');
username.attr('href', el.url);
user.removeClass('full');
}else{
});*/
$('.cloudbar .profile .full>a').live('click', function(e){
e.preventDefault();
+ $('.cloudbar .profile ul').css('width',$('.profile').outerWidth() );
$(this).siblings('ul').toggle();
$(this).toggleClass('open');
+
});
- var profileWidth = profile.outerWidth();
- $('.header .profile ul').css('width',profileWidth );
+