当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript jquery.min类代码示例

本文整理汇总了TypeScript中jquery/dist/jquery.min的典型用法代码示例。如果您正苦于以下问题:TypeScript min类的具体用法?TypeScript min怎么用?TypeScript min使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了min类的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类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。