1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- /**
- * Created by Administrator on 2016/10/22.
- */
- var isopen = true;
- var main = {
- slideTabcons: function(){
- $('.tabcontent').slideToggle(200);
- if(isopen == true){
- $('#slideBtn').html('展 开 <span><</span>');
- isopen = false;
- return;
- }
- if(isopen == false){
- $('#slideBtn').html('收 起 <span>></span>');
- isopen = true;
- return;
- }
- },
- tab: function(){
- $('.tabtitle a').each(function(index,element){
- $(this).click(function(){
- $(this).addClass('active').siblings('a').removeClass('active');
- $('.tabwrap').eq(index).show().siblings('.tabwrap').hide();
- $('.tabcontent').slideDown(200);
- $('#slideBtn').html('收 起 <span>></span>');
- isopen = true;
- });
- });
- }
- };
- $(function(){
- main.tab();
- $('#slideBtn').off().on('click',main.slideTabcons);
- $('.showDetail').each(function(){
- $(this).on('click',function(){
- $(this).toggleClass('isview');
- $(this).parents('.itemWrap').find('.subItembox').slideToggle(200);
- });
- });
- //$('.newslist ul li:odd').css('float','right');
- $('.newslist ul').each(function(index){
- if(index %2 == 1) {
- $(this).css({'float':'right'});
- }
- var _this = $(this).find('li');
- _this.each(function(i){
- if(i%5 ==4) {
- $(this).after('<div class="appendline"></div>');
- }
- });
- });
- $('.tabtitle2 a').each(function(index){
- $(this).click(function(){
- $(this).addClass('active').siblings('a').removeClass('active');
- $('.tabcont').eq(index).show().siblings('.tabcont').hide();
- });
- });
- $('.nav ul li a').each(function(){
- var src = $(this).find('img').attr('src');
- if($(this).hasClass('on')){
- $(this).find('img').attr('src',src.substring(0,7)+'h'+src.substring(7));
- }
- $(this).hover(function(){
- $(this).find('img').attr('src',src.substring(0,7)+'h'+src.substring(7));
- },function(){
- $(this).find('img').attr('src',src);
- });
- });
- $('.infomationlist li').each(function(){
- var _this = $(this);
- _this.find('input').blur(function(){
- _this.find('img').hide();
- $(this).attr('disabled','disabled').addClass('disabled');
- });
- $(this).hover(function(){
- //$(this).find('input').removeClass('disabled').attr('disabled','false');
- $(this).find('img').show();
- },function(){
- $(this).find('img').hide();
- });
- });
- $('.edit').each(function(){
- $(this).off().on('click',function(){
- $(this).parents('li:first').find('input').removeClass('disabled').attr('disabled',false);
- });
- });
- });
|