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


TypeScript jquery类代码示例

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


在下文中一共展示了jquery类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: V

import * as joint from "../../build/joint";
import './custom';
import {V, g} from "../../build/joint";
import * as $ from "jquery";

const $body = $('body');
const svg = joint.V('svg');
const svgRect = V('rect').attr({fill: 'red', width: 80, height: 50});
const svgEllipse = V('ellipse').attr({fill: 'green', rx: 100, ry: 50, cx: 200, cy: 80, x: 20, y: 30});

svg.append(svgRect);
svg.append(svgEllipse.node);

$body.append($('<h3/>').text('Example SVG created by Vectorizer'));
$body.append(svg.node);

const graph = new joint.dia.Graph;
const paper = new joint.dia.Paper({
    el: $('#paper'),
    width: 650,
    height: 400,
    gridSize: 20,
    model: graph,
    markAvailable: true,
    defaultLink: new joint.shapes.app.Link()
});

let rect = new joint.shapes.basic.Rect()
    .position(10, 10)
    .size(100, 100)
    .addTo(graph)
开发者ID:DavidPesta,项目名称:joint,代码行数:31,代码来源:index.ts

示例2: lnk

function lnk(id: string, txt?: string) {
	var a = $('<a/>', {href: '#'+id});
	a.text(txt || (helpData[_.toLower(id)] || new HelpData(id, () => [])).title);
	return a;
}
开发者ID:UnlitStudio,项目名称:PlazaPlus,代码行数:5,代码来源:help.ts

示例3: close

	protected close() {
		this.element.fadeOut();
		$('body').removeClass('modal-open');
	}
开发者ID:openevocracy,项目名称:openevocracy,代码行数:4,代码来源:modal.component.ts

示例4: CandleList

$(() => {
    $.ajax({
        url:'/stockdata/'+stock,
        success:(candles:Candle[])=>{

            const candleList:CandleList = new CandleList(candles);

            let sma8:any[] = candleList.getSMA(8);
            let sma21:any[] = candleList.getSMA(21);
            let sma55:any[] = candleList.getSMA(55);
            
            candles = candles.slice(-180);
            sma8 = sma8.slice(-180);
            sma21 = sma21.slice(-180);
            sma55 = sma55.slice(-180);
            
            $('body').append('<div id="chart"></div>');
            
            const chart = new Chart({
                svg:d3.select('#chart').append('svg'),
                width:1350,
                height:300,
                padding:{top:50,right:70,bottom:0,left:0},
                dateArray:candles.map(candle => candle.date),
                minValue:d3.min(candles.map(candle => candle.low)),
                maxValue:d3.max(candles.map(candle => candle.high))
            });
            
            chart.plotPivots(new CandleList(candles).getPivots().lows,'pivot-lows','blue','low');
            chart.plotPivots(new CandleList(candles).getPivots().highs,'pivot-highs','red','high');
            
            chart.plotDateAxis('date-axis');
            chart.plotValueAxis('price-axis',10);
            // chart.plotSupportLines(candles);
            chart.plotCandles(candles,'price-chart');
            chart.onMouseMove(date=>{
                console.log(date);
            });
            // chart.plotCurve(candles.map(candle => {return {
            //     date:candle.date,
            //     value:candle.low
            // }}),'price-chart','yellow');
            // chart.plotCurve(candles.map(candle => {return {
            //     date:candle.date,
            //     value:candle.high
            // }}),'price-chart','steelblue');
            // chart.plotCurve(sma8,'price-sma-8','red');
            // chart.plotCurve(sma21,'price-sma-21','blue');
            // chart.plotCurve(sma55,'price-sma-55','yellow');
            
            
            
            chart.plotCrossHair();
        },
        error:(error) => {
            console.log(error);
        }
    });
});
开发者ID:cyrilpanicker,项目名称:stock-scope,代码行数:59,代码来源:main.ts

示例5: constructor

 constructor(elementRef: ElementRef) {
   this.element = $(elementRef.nativeElement);
   GROUPS.set(this.scrollGroup, GROUPS.get(this.scrollGroup) || []);
   GROUPS.get(this.scrollGroup).push(this.element);
 }
开发者ID:arpitsaan,项目名称:ShapeShifter,代码行数:5,代码来源:scrollgroup.directive.ts

示例6: function

		this.element.on('click', function (e: any) {
			var target = $(e.target);
			if (!target.closest('.modal-dialog').length) {
				modal.close();
			}
		});
开发者ID:openevocracy,项目名称:openevocracy,代码行数:6,代码来源:modal.component.ts

示例7: renderEl

 renderEl() {
   const scrollEl = super.renderEl()
   return $('<div class="fc-scroller-clip" />').append(scrollEl) // return value
 }
开发者ID:diomed,项目名称:fullcalendar-scheduler,代码行数:4,代码来源:ClippedScroller.ts

示例8: print_log

function print_log(msg: Log) {
    const log_line = $("<div></div>").text(msg.line);
    console.log("line")
    $('#log').append(log_line);
}
开发者ID:crepi22,项目名称:dccjs,代码行数:5,代码来源:logs.ts

示例9: canUndo

export function canUndo(): boolean {
    return (
        getTheOneReaderToolsModel().shouldHandleUndo() &&
        getTheOneReaderToolsModel().canUndo()
    );
}

export function undo() {
    getTheOneReaderToolsModel().undo();
}

export function applyToolboxStateToPage() {
    applyToolboxStateToUpdatedPage();
}

$(document).ready(() => {
    getTheOneToolbox().initialize();
});

// Make the one instance of each Toolbox class and register it with the master toolbox.
// The imports we need to make these calls possible also serve to ensure that each
// toolbox's code is made part of the bundle.
ToolBox.registerTool(new BookSettings());
ToolBox.registerTool(new DecodableReaderToolboxTool());
ToolBox.registerTool(new LeveledReaderToolboxTool());
ToolBox.registerTool(new MusicToolAdaptor());
ToolBox.registerTool(new ImpairmentVisualizerAdaptor());
ToolBox.registerTool(new MotionTool());
ToolBox.registerTool(new TalkingBookTool());
ToolBox.registerTool(new SignLanguageTool());
ToolBox.registerTool(new ImageDescriptionAdapter());
开发者ID:BloomBooks,项目名称:BloomDesktop,代码行数:31,代码来源:toolboxBootstrap.ts

示例10:

		$('#content').slideUp(function() { $('#content').empty().append(content).slideDown(); });
开发者ID:UnlitStudio,项目名称:PlazaPlus,代码行数:1,代码来源:help.ts


注:本文中的jquery类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。