aboutsummaryrefslogtreecommitdiffstats
path: root/toj/jcs/notice.js
diff options
context:
space:
mode:
Diffstat (limited to 'toj/jcs/notice.js')
-rwxr-xr-x[-rw-r--r--]toj/jcs/notice.js45
1 files changed, 28 insertions, 17 deletions
diff --git a/toj/jcs/notice.js b/toj/jcs/notice.js
index b2e5122..0f027fd 100644..100755
--- a/toj/jcs/notice.js
+++ b/toj/jcs/notice.js
@@ -6,6 +6,10 @@ var notice = new function(){
var listnew = function(noticeo){
j_item = $('<li class="item"><a class="item"><div class="head"></div><div class="content"></div></a></li>')
j_a = j_item.find('a.item');
+ j_a.on('click',function(e){
+ that.hide();
+ });
+
j_head = j_item.find('div.head');
j_content = j_item.find('div.content');
@@ -105,7 +109,7 @@ var notice = new function(){
j_notice.removeClass('notice_h');
j_notice.text('[' + count + ']');
}else{
- if($('#notice_list').css('opacity') == 1){
+ if($('#notice_list_box').css('opacity') == 1){
updatenew();
}else{
j_notice.addClass('notice_h');
@@ -123,32 +127,22 @@ var notice = new function(){
$(window).on('click',function(e){
var j_notice;
- if(e.target == null || ($(e.target).parents('a.item').length == 0 && $(e.target).parents('#notice_list').length > 0)){
+ if(e.target == null || ($(e.target).parents('a.item').length == 0 && $(e.target).parents('#notice_list_box').length > 0)){
return;
}
j_notice = $('#index_head_notice');
if(e.target.id == 'index_head_notice' && !j_notice.hasClass('notice_s')){
- j_notice.addClass('notice_s');
- $('#notice_list_box').stop().animate({width:322},'slow','easeOutExpo');
- $('#notice_list').css('opacity','1').stop().animate({right:0},'slow','easeOutExpo');
- $('#notice_list a.item').stop().animate({left:0},'slow','easeOutQuart');
- }else{
- j_notice.removeClass('notice_s');
- $('#notice_list').stop().animate({opacity:0},'fast','easeOutQuad',
- function(){
- $('#notice_list_box').css('width','0px');
- $('#notice_list').css('right','-322px');
- $('#notice_list a.item').css('left','50%');
- }
- );
+ that.show();
+ }else if(j_notice.hasClass('notice_s')){
+ that.hide();
}
});
$('#index_head_notice').on('click',function(e){
var j_list;
j_list = $('#notice_list');
- if(j_list.css('opacity') == 0){
+ if($('#notice_list_box').css('opacity') == 0){
j_list.empty();
enid = null;
updatenew();
@@ -159,5 +153,22 @@ var notice = new function(){
refresh();
};
-
+ that.show = function(){
+ index.page_scroll_lock();
+
+ $('#index_head_notice').addClass('notice_s');
+ $('#notice_list_box').stop().css('opacity','1').animate({width:322},'slow','easeOutExpo');
+ $('#notice_list a.item').stop().animate({left:0},'slow','easeOutQuart');
+ };
+ that.hide = function(){
+ $('#index_head_notice').removeClass('notice_s');
+ $('#notice_list_box').stop().animate({opacity:0},'fast','easeOutQuad',
+ function(){
+ $('#notice_list_box').css('width','0px');
+ $('#notice_list a.item').css('left','50%');
+
+ index.page_scroll_unlock();
+ }
+ );
+ };
};