本文整理汇总了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");
}
}
}
}
}
}
示例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")
}
});
示例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");
}
}
}
}
}
示例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();
}
}
示例5: OutHoverPage
public OutHoverPage(event){
$(event.currentTarget).removeClass("hover").children().removeClass("hover");
$(event.currentTarget).parent().prev().find("span.arrow:first").removeClass("pre_hover");
}
示例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 + '%');
}