<tr id="frcqn"></tr>
<strong id="frcqn"><optgroup id="frcqn"></optgroup></strong>
<tr id="frcqn"></tr>
<tr id="frcqn"></tr>
<tr id="frcqn"></tr>
  • 0712-2888027 189-8648-0214
    微信公眾號

    孝感風信網絡科技有限公司微信公眾號

    當前位置:主頁 > 技術支持 > Javascript/JQuery > Jquery獲取標簽屬性,增加樣式,刪除樣式,寫入文本代碼

    Jquery獲取標簽屬性,增加樣式,刪除樣式,寫入文本代碼

    時間:2023-11-04來源:風信官網 點擊: 373次
    Jquery獲取標簽屬性,增加樣式,刪除樣式,寫入文本代碼如下:
    $(function () {    
        $('#timeline li ul').slideUp(); //
        $('#timeline li ').removeClass('selected');
        
        //var timelineText=$('#timelineText').text();
        //alert(timelineText);
        
        $('#timeline li a').click(function () {
            //var rel=$(this).attr('rel');  //獲取rel
            //var css=$(this).attr('class');  //獲取class
            //var timetext=$(this).find('small').text() ; //獲取a中的文本    
            /*
            if ($(this).is('.disabled')){
        
                $(this).addClass("selected");  //添加selected樣式
                $(this).removeClass("disabled");  //刪除disable樣式
                //$("#timelineText").text(timetext); //寫入文本
                
            }else if($(this).is('.selected')){
                
                $(this).addClass("disabled");
                $(this).removeClass("selected");
                //$("#timelineText").text(timetext); //寫入文本
            }*/
            
            if ($(this)){    
                $(this).addClass("selected");
                $(this).removeClass("disabled");
                $(this).removeAttr('href');            
            }
            
        });
        
    });
    
    欄目列表
    推薦內容
    熱點內容
    展開
    强奸乱伦之影音先锋,播放器男女免费,精品一区二区自拍偷拍,xxxxx日韩
    <tr id="frcqn"></tr>
    <strong id="frcqn"><optgroup id="frcqn"></optgroup></strong>
    <tr id="frcqn"></tr>
    <tr id="frcqn"></tr>
    <tr id="frcqn"></tr>