當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript min.js方法代碼示例

本文整理匯總了TypeScript中jquery/dist/jquery.min.js方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript min.js方法的具體用法?TypeScript min.js怎麽用?TypeScript min.js使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在jquery/dist/jquery.min的用法示例。


在下文中一共展示了min.js方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: hover

 public hover(event){
     let item = event.currentTarget;
     let id = item.id;
     let no = Number(id.replace(this.items.icon + "_", ""));
     if(!this.isEdit){
         for (let index = 1; index <= this.items.scale; index++) {
             let icon_id = String(this.question_id) + "_" +  index;
             if(index <= no){
                 if(this.items.icon == 'heart' || this.items.icon == 'star'){
                     $("#" + icon_id +".star-rating-icon").removeClass("fa-" + this.items.icon + "-o");
                     $("#" + icon_id +".star-rating-icon").addClass("fa-" + this.items.icon);
                 }else if(this.items.icon == 'like'){
                     $("#" + icon_id +".star-rating-icon").removeClass("fa-thumbs-o-up");
                     $("#" + icon_id +".star-rating-icon").addClass("fa-thumbs-up");
                 }
                
             }else{
                 if(!$("#" + icon_id +".star-rating-icon").hasClass("selected")){
                     if(this.items.icon == 'heart' || this.items.icon == 'star'){
                         $("#" + icon_id +".star-rating-icon").removeClass("fa-" + this.items.icon);
                         $("#" + icon_id +".star-rating-icon").addClass("fa-" + this.items.icon + "-o");
                     }else if(this.items.icon == 'like'){
                         $("#" + icon_id +".star-rating-icon").removeClass("fa-thumbs-up");
                         $("#" + icon_id +".star-rating-icon").addClass("fa-thumbs-o-up");
                     }
                 }
             }
     
         }
     }   
 }
開發者ID:luuthi,項目名稱:mysurvey,代碼行數:31,代碼來源:star-rating.component.ts

示例2:

 this._pageService.get_page_by_survey(this.current_survey.survey_id).subscribe(data=>{
   this.lstPage = data.Data;
   this.current_page = this.lstPage.filter(x=>x.page_id == page_id)[0];
   this.questionContainer.clear();
   this.loadByPage();
   if(data.TotalRows%2 ==0){
     $(".pagings").css("background-color","#0683c9")
   }else{
     $(".pagings").css("background-color","#85d2fc")
   }
 });
開發者ID:luuthi,項目名稱:mysurvey,代碼行數:11,代碼來源:report.component.ts

示例3: leavehover

 public leavehover(){
     if(!this.isEdit){
         for (let index = 1; index <= this.items.scale; index++) {
             let icon_id = String(this.question_id) + "_" +  index;
             if(!$("#" + icon_id +".star-rating-icon").hasClass("selected")){
                 if(this.items.icon == 'heart' || this.items.icon == 'star'){
                     $("#" + icon_id +".star-rating-icon").removeClass("fa-" + this.items.icon);
                     $("#" + icon_id +".star-rating-icon").addClass("fa-" + this.items.icon + "-o");
                 }else if(this.items.icon == 'like'){
                     $("#" + icon_id +".star-rating-icon").removeClass("fa-thumbs-up");
                     $("#" + icon_id +".star-rating-icon").addClass("fa-thumbs-o-up");
                 }
             }
         }
     }
 }
開發者ID:luuthi,項目名稱:mysurvey,代碼行數:16,代碼來源:star-rating.component.ts

示例4: changeChart

 public changeChart(id){
   let chart = $("#chartOption_"+ id +" option:selected").val();
   let lstChart = $("#question_"+ id + " .chart-section");
   for (let index = 0; index < lstChart.length; index++) {
     const element = lstChart[index];
     $(element).hide();
   }
   if(chart == 'horizontalBar'){
     $("#question_"+ id + " .chart-section").first().show()
   }else if(chart == 'doughnut'){
     $("#question_"+ id + " .chart-section:nth-child(2)").show();
   }else if(chart == 'pie'){
     $("#question_"+ id + " .chart-section:nth-child(3)").show();
   }
   
 }
開發者ID:luuthi,項目名稱:mysurvey,代碼行數:16,代碼來源:report.component.ts

示例5: OutHoverPage

 public OutHoverPage(event){
   $(event.currentTarget).removeClass("hover").children().removeClass("hover");
   $(event.currentTarget).parent().prev().find("span.arrow:first").removeClass("pre_hover");
 }
開發者ID:luuthi,項目名稱:mysurvey,代碼行數:4,代碼來源:report.component.ts

示例6: ngAfterViewInit

 ngAfterViewInit() {
     //Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.
     //Add 'implements AfterViewInit' to the class.
     $('.star-rating-item.' + this.items.icon +"_"+ this.question_id).width(100/this.items.scale + '%');
 }
開發者ID:luuthi,項目名稱:mysurvey,代碼行數:5,代碼來源:star-rating.component.ts


注:本文中的jquery/dist/jquery.min.js方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。