Fix reshare, user_menu
This commit is contained in:
parent
bd6a8df7cc
commit
fd0f3a9a1c
2 changed files with 9 additions and 5 deletions
|
|
@ -43,8 +43,12 @@ $(document).ready(function(){
|
||||||
// reshare button action
|
// reshare button action
|
||||||
$stream.delegate(".reshare_button", "click", function(evt){
|
$stream.delegate(".reshare_button", "click", function(evt){
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
$(this).toggleClass("active")
|
button = $(this)
|
||||||
.closest(".reshare_pane").children(".reshare_box").toggle();
|
box = button.siblings(".reshare_box");
|
||||||
|
if(box.length > 0){
|
||||||
|
button.toggleClass("active");
|
||||||
|
box.toggle();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});//end document ready
|
});//end document ready
|
||||||
|
|
|
||||||
|
|
@ -64,11 +64,11 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$('body').click( function(event){
|
$('body').click( function(event){
|
||||||
var $this = $(this);
|
var target = $(event.target);
|
||||||
if(!$this.closest('#user_menu').length){
|
if(!target.closest('#user_menu').length){
|
||||||
$("#user_menu").removeClass("active");
|
$("#user_menu").removeClass("active");
|
||||||
};
|
};
|
||||||
if(!$this.closest('.reshare_pane').length){
|
if(!target.closest('.reshare_pane').length){
|
||||||
$(".reshare_button").removeClass("active");
|
$(".reshare_button").removeClass("active");
|
||||||
$(".reshare_box").hide();
|
$(".reshare_box").hide();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue