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
|
||||
$stream.delegate(".reshare_button", "click", function(evt){
|
||||
evt.preventDefault();
|
||||
$(this).toggleClass("active")
|
||||
.closest(".reshare_pane").children(".reshare_box").toggle();
|
||||
button = $(this)
|
||||
box = button.siblings(".reshare_box");
|
||||
if(box.length > 0){
|
||||
button.toggleClass("active");
|
||||
box.toggle();
|
||||
}
|
||||
});
|
||||
|
||||
});//end document ready
|
||||
|
|
|
|||
|
|
@ -64,11 +64,11 @@ $(document).ready(function(){
|
|||
});
|
||||
|
||||
$('body').click( function(event){
|
||||
var $this = $(this);
|
||||
if(!$this.closest('#user_menu').length){
|
||||
var target = $(event.target);
|
||||
if(!target.closest('#user_menu').length){
|
||||
$("#user_menu").removeClass("active");
|
||||
};
|
||||
if(!$this.closest('.reshare_pane').length){
|
||||
if(!target.closest('.reshare_pane').length){
|
||||
$(".reshare_button").removeClass("active");
|
||||
$(".reshare_box").hide();
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue